[devel] Imported from libpng-1.5.0beta30.tar

This commit is contained in:
Glenn Randers-Pehrson
2010-06-22 13:03:32 -05:00
parent 5feb87cd0e
commit ef3831a1fe
52 changed files with 134 additions and 115 deletions

View File

@@ -1,7 +1,7 @@
/* pngpread.c - read a png file in push mode
*
* Last changed in libpng 1.5.0 [June 21, 2010]
* Last changed in libpng 1.5.0 [June 22, 2010]
* Copyright (c) 1998-2010 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
@@ -837,7 +837,7 @@ png_process_IDAT_data(png_structp png_ptr, png_bytep buffer,
png_size_t buffer_length)
{
/* The caller checks for a non-zero buffer length. */
if (!(buffer_length > 0) || buffer == 0)
if (!(buffer_length > 0) || buffer == NULL)
png_error(png_ptr, "No IDAT data (internal error)");
/* This routine must process all the data it has been given
@@ -856,7 +856,7 @@ png_process_IDAT_data(png_structp png_ptr, png_bytep buffer,
int ret;
/* We have data for zlib, but we must check that zlib
* has somewhere to put the results. It doesn't matter
* has someplace to put the results. It doesn't matter
* if we don't expect any results -- it may be the input
* data is just the LZ end code.
*/
@@ -870,11 +870,11 @@ png_process_IDAT_data(png_structp png_ptr, png_bytep buffer,
}
/* Using Z_SYNC_FLUSH here means that an unterminated
* LZ stream can still be handled (a stream with a missing
* end code), otherwise (Z_NO_FLUSH) a future zlib
* implementation might defer output and, therefore,
* change the current behavior. (See comments in inflate.c
* for why this doesn't happen at present with zlib 1.2.5.)
* LZ stream (a stream with a missing end code) can still
* be handled, otherwise (Z_NO_FLUSH) a future zlib
* implementation might defer output and therefore
* change the current behavior (see comments in inflate.c
* for why this doesn't happen at present with zlib 1.2.5).
*/
ret = inflate(&png_ptr->zstream, Z_SYNC_FLUSH);