mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[libpng17] Imported from libpng-1.7.0beta36.tar
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user