[libpng17] Implemented assert support and usage.

This commit is contained in:
John Bowler
2015-03-20 16:39:56 -05:00
committed by Glenn Randers-Pehrson
parent e8e7b6681e
commit 2460d9494d
20 changed files with 336 additions and 50 deletions

View File

@@ -12,6 +12,7 @@
*/
#include "pngpriv.h"
#define PNG_SRC_FILE PNG_SRC_FILE_pngpread
#ifdef PNG_PROGRESSIVE_READ_SUPPORTED
@@ -711,8 +712,7 @@ png_process_IDAT_data(png_structrp png_ptr, png_bytep buffer,
png_size_t buffer_length)
{
/* The caller checks for a non-zero buffer length. */
if (!(buffer_length > 0) || buffer == NULL)
png_error(png_ptr, "No IDAT data (internal error)");
assert(buffer_length > 0 && buffer != NULL);
/* This routine must process all the data it has been given
* before returning, calling the row callback as required to