3rdparty(libpng): re-apply OpenCV patches
authorAlexander Alekhin <alexander.alekhin@intel.com>
Mon, 3 Jun 2019 12:04:51 +0000 (15:04 +0300)
committerAlexander Alekhin <alexander.alekhin@intel.com>
Mon, 3 Jun 2019 12:04:51 +0000 (15:04 +0300)
3rdparty/libpng/pngrutil.c

index d5fa08c..4db3de9 100644 (file)
@@ -2087,10 +2087,8 @@ png_handle_eXIf(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
       }
    }
 
-   if (png_crc_finish(png_ptr, 0) != 0)
-      return;
-
-   png_set_eXIf_1(png_ptr, info_ptr, length, info_ptr->eXIf_buf);
+   if (png_crc_finish(png_ptr, 0) == 0)
+      png_set_eXIf_1(png_ptr, info_ptr, length, info_ptr->eXIf_buf);
 
    png_free(png_ptr, info_ptr->eXIf_buf);
    info_ptr->eXIf_buf = NULL;