Imported from libpng-1.2.26beta04.tar

This commit is contained in:
Glenn Randers-Pehrson
2008-03-18 18:38:07 -05:00
parent 3236beddf8
commit 936df0d290
51 changed files with 127 additions and 112 deletions

View File

@@ -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));