mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
Imported from libpng-1.2.26beta04.tar
This commit is contained in:
@@ -3138,7 +3138,12 @@ defined(PNG_USER_TRANSFORM_PTR_SUPPORTED)
|
||||
if (row_bytes > (png_uint_32)65536L)
|
||||
png_error(png_ptr, "This image requires a row greater than 64KB");
|
||||
#endif
|
||||
|
||||
if (png_ptr->big_row_buf)
|
||||
png_free(png_ptr,png_ptr->big_row_buf);
|
||||
png_ptr->big_row_buf = (png_bytep)png_malloc(png_ptr, row_bytes+64);
|
||||
if (png_ptr->row_buf)
|
||||
png_free(png_ptr,png_ptr->row_buf);
|
||||
png_ptr->row_buf = png_ptr->big_row_buf+32;
|
||||
|
||||
#ifdef PNG_MAX_MALLOC_64K
|
||||
@@ -3147,6 +3152,8 @@ defined(PNG_USER_TRANSFORM_PTR_SUPPORTED)
|
||||
#endif
|
||||
if ((png_uint_32)png_ptr->rowbytes > (png_uint_32)(PNG_SIZE_MAX - 1))
|
||||
png_error(png_ptr, "Row has too many bytes to allocate in memory.");
|
||||
if (png_ptr->prev_row)
|
||||
png_free(png_ptr,png_ptr->prev_row);
|
||||
png_ptr->prev_row = (png_bytep)png_malloc(png_ptr, (png_uint_32)(
|
||||
png_ptr->rowbytes + 1));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user