[libpng16] Imported from libpng-1.6.30beta02.tar

This commit is contained in:
Glenn Randers-Pehrson
2017-04-22 15:30:52 -05:00
parent 60d8ae1003
commit 2eff8ef504
13 changed files with 25 additions and 17 deletions

View File

@@ -983,6 +983,11 @@ void write_png(char *file_name /* , ... other image information ... */)
png_uint_32 k, height, width;
/* In this example, "image" is a one-dimensional array of bytes */
/* Guard against integer overflow */
if (height > PNG_SIZE_MAX/(width*bytes_per_pixel)) {
png_error(png_ptr, "Image_data buffer would be too large");
}
png_byte image[height*width*bytes_per_pixel];
png_bytep row_pointers[height];