aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn Randers-Pehrson <glennrp at users.sourceforge.net>2016-11-08 16:04:08 -0600
committerAlex Naidis <alex.naidis@linux.com>2016-11-21 20:51:33 +0000
commit8c0c9e14afdd03610a9802eda4805a5f0d326375 (patch)
treef12fbd4645febaef021d96a86938daa7c317fd93
parent6e4f16bef1c4d89e74e24f94515b35e2d6b9bcf7 (diff)
downloadlibpng-8c0c9e14afdd03610a9802eda4805a5f0d326375.tar.gz
[libpng16] Revert ADLER32 error handling in pngrutil.c and pngpread.c.
Change-Id: If8bd77a3fea39c6a8e33daca8d61c8d43a5fb77c Signed-off-by: Alex Naidis <alex.naidis@linux.com>
-rw-r--r--README.android4
-rw-r--r--pngpread.c7
-rw-r--r--pngrutil.c10
3 files changed, 6 insertions, 15 deletions
diff --git a/README.android b/README.android
index f6062c609..32fb665f9 100644
--- a/README.android
+++ b/README.android
@@ -21,3 +21,7 @@ be listed here:
in contrib/intel/intel_sse.patch.
The patch was applied using the following command:
'patch -i contrib/intel/intel_sse.patch -p1'
+
+(5) Revert ADLER32 error handling to fix the infinite loop
+Cherry picked from upstream:
+https://github.com/glennrp/libpng/commit/d65a92b951079d315e17e20ba9e7b8423d19397e
diff --git a/pngpread.c b/pngpread.c
index 650ba1e23..794352f42 100644
--- a/pngpread.c
+++ b/pngpread.c
@@ -684,12 +684,7 @@ png_process_IDAT_data(png_structrp png_ptr, png_bytep buffer,
png_warning(png_ptr, "Truncated compressed data in IDAT");
else
- {
- if (ret == Z_DATA_ERROR)
- png_benign_error(png_ptr, "IDAT: ADLER32 checksum mismatch");
- else
- png_error(png_ptr, "Decompression error in IDAT");
- }
+ png_error(png_ptr, "Decompression error in IDAT");
/* Skip the check on unprocessed input */
return;
diff --git a/pngrutil.c b/pngrutil.c
index fb5f5f083..339036749 100644
--- a/pngrutil.c
+++ b/pngrutil.c
@@ -4107,15 +4107,7 @@ png_read_IDAT_data(png_structrp png_ptr, png_bytep output,
png_zstream_error(png_ptr, ret);
if (output != NULL)
- {
- if(!strncmp(png_ptr->zstream.msg,"incorrect data check",20))
- {
- png_chunk_benign_error(png_ptr, "ADLER32 checksum mismatch");
- continue;
- }
- else
- png_chunk_error(png_ptr, png_ptr->zstream.msg);
- }
+ png_chunk_error(png_ptr, png_ptr->zstream.msg);
else /* checking */
{