Bug fix. set std error_exit to __my_error_exit 78/318178/2
authorJiyong <jiyong.min@samsung.com>
Tue, 14 Jan 2025 04:14:41 +0000 (13:14 +0900)
committerJiyong <jiyong.min@samsung.com>
Tue, 14 Jan 2025 04:23:51 +0000 (13:23 +0900)
[Issue]
  The standard error_exit terminates application if parsing error occurs.

[Solution]
  The __my_error_exit should override std error_exit.
  However, it didn't override it due to an mistake.
  The std error functions is replaced to __my_error_exit after getting it.

Change-Id: Ic6899da6e6eff10bacb97decf9cc6e97d72ef7a9

jpeg/mm_util_jpeg.c

index b00f212bf53a4bbbcabf07a1cbc431823f85c6df..f69c469f98203c228479d804a878e15654de53c8 100644 (file)
@@ -81,11 +81,11 @@ static bool __mm_util_is_supported_color_format(mm_util_color_format_e color_for
 
 static int __jpeg_set_error_handler(my_error_ptr jerr, jpeg_error_ptr *err)
 {
-       (jerr->pub).error_exit = __my_error_exit;
-       mm_util_debug("jerr.pub.error_exit ");
-
        *err = jpeg_std_error((jpeg_error_ptr)&(jerr->pub));
-       mm_util_debug("jpeg_std_error ");
+       mm_util_debug("get jpeg_std_error");
+
+       (jerr->pub).error_exit = __my_error_exit;
+       mm_util_debug("set jerr.pub.error_exit to __my_error_exit");
 
        /* Establish the setjmp return context for __my_error_exit to use. */
        if (setjmp(jerr->setjmp_buffer)) {