am 3c3a7e1f: (-s ours) am 791d8f2e: Upgrading libpng to 1.2.46 to fix a few vulnerabilities. DO NOT MERGE
* commit '3c3a7e1f0fbff859b3aaff19069aee5d623a1f75':
Upgrading libpng to 1.2.46 to fix a few vulnerabilities. DO NOT MERGE
diff --git a/pngread.c b/pngread.c
index fc4788b..b301d41 100644
--- a/pngread.c
+++ b/pngread.c
@@ -776,13 +776,18 @@
png_ptr->flags |= PNG_FLAG_ZLIB_FINISHED;
break;
}
- if (ret != Z_OK)
+ if (ret != Z_OK) {
#ifdef PNG_INDEX_SUPPORTED
- if (png_ptr->index && png_ptr->row_number != png_ptr->height - 1)
+ if (png_ptr->index) {
+ if (png_ptr->row_number != png_ptr->height - 1) {
+ png_error(png_ptr, png_ptr->zstream.msg ? png_ptr->zstream.msg :
+ "Decompression error");
+ }
+ } else
#endif
png_error(png_ptr, png_ptr->zstream.msg ? png_ptr->zstream.msg :
- "Decompression error");
-
+ "Decompression error");
+ }
} while (png_ptr->zstream.avail_out);
png_ptr->row_info.color_type = png_ptr->color_type;