diff options
author | Glenn Randers-Pehrson <glennrp at users.sourceforge.net> | 2002-08-06 18:06:11 -0500 |
---|---|---|
committer | Glenn Randers-Pehrson <glennrp at users.sourceforge.net> | 2009-04-06 16:07:23 -0500 |
commit | 859665d8470277ef03e0c610f4d27c6dcc9a8673 (patch) | |
tree | 0ee79a51acb815a160a4f85d5af93963c33508ea /pngrutil.c | |
parent | 484a8a10fe72449fdae0bcabd4cec416777e0207 (diff) | |
download | libpng-859665d8470277ef03e0c610f4d27c6dcc9a8673.tar.gz |
Imported from libpng-1.2.5beta1.tarv1.2.5beta1
Diffstat (limited to 'pngrutil.c')
-rw-r--r-- | pngrutil.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/pngrutil.c b/pngrutil.c index 974006311..04e1f4f03 100644 --- a/pngrutil.c +++ b/pngrutil.c @@ -1,7 +1,7 @@ /* pngrutil.c - utilities to read a PNG file * - * libpng 1.2.4 - July 8, 2002 + * libpng 1.2.5beta1 - August 6, 2002 * For conditions of distribution and use, see copyright notice in png.h * Copyright (c) 1998-2002 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) @@ -2883,7 +2883,7 @@ png_read_finish_row(png_structp png_ptr) { if (!(png_ptr->zstream.avail_out) || png_ptr->zstream.avail_in || png_ptr->idat_size) - png_error(png_ptr, "Extra compressed data"); + png_warning(png_ptr, "Extra compressed data"); png_ptr->mode |= PNG_AFTER_IDAT; png_ptr->flags |= PNG_FLAG_ZLIB_FINISHED; break; @@ -2893,14 +2893,19 @@ png_read_finish_row(png_structp png_ptr) "Decompression Error"); if (!(png_ptr->zstream.avail_out)) - png_error(png_ptr, "Extra compressed data"); + { + png_warning(png_ptr, "Extra compressed data."); + png_ptr->mode |= PNG_AFTER_IDAT; + png_ptr->flags |= PNG_FLAG_ZLIB_FINISHED; + break; + } } png_ptr->zstream.avail_out = 0; } if (png_ptr->idat_size || png_ptr->zstream.avail_in) - png_error(png_ptr, "Extra compression data"); + png_warning(png_ptr, "Extra compression data"); inflateReset(&png_ptr->zstream); |