mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[libpng17] Implemented assert support and usage.
This commit is contained in:
committed by
Glenn Randers-Pehrson
parent
e8e7b6681e
commit
2460d9494d
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user