[libpng15] Merge with libpng16/pngtest.c, pngvalid.c, gregbook, pngminim

This commit is contained in:
Glenn Randers-Pehrson
2016-10-30 08:09:54 -05:00
parent b555c55c6d
commit 5a945f3393
20 changed files with 330 additions and 282 deletions

View File

@@ -163,8 +163,12 @@ uch *readpng_get_image(double display_exponent, int *pChannels, ulg *pRowbytes)
/* now we can go ahead and just read the whole image */
fread(image_data, 1L, rowbytes*height, saved_infile);
if (fread(image_data, 1L, rowbytes*height, saved_infile) <
rowbytes*height) {
free (image_data);
image_data = NULL;
return NULL;
}
return image_data;
}