mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
Add a check to pngimage.c
Check the result of png_get_IHDR inside the compare_read function. Contributed-by: Kleber Tarcísio Signed-off-by: Cosmin Truta
This commit is contained in:
parent
e2bb5e7512
commit
2224c8ea7b
@ -1006,8 +1006,9 @@ compare_read(struct display *dp, int applied_transforms)
|
||||
int interlace_method, compression_method, filter_method;
|
||||
const char *e = NULL;
|
||||
|
||||
png_get_IHDR(dp->read_pp, dp->read_ip, &width, &height, &bit_depth,
|
||||
&color_type, &interlace_method, &compression_method, &filter_method);
|
||||
if (!png_get_IHDR(dp->read_pp, dp->read_ip, &width, &height, &bit_depth,
|
||||
&color_type, &interlace_method, &compression_method, &filter_method))
|
||||
display_log(dp, LIBPNG_BUG, "png_get_IHDR failed");
|
||||
|
||||
# define C(item) if (item != dp->item) \
|
||||
display_log(dp, APP_WARNING, "IHDR " #item "(%lu) changed to %lu",\
|
||||
|
Loading…
x
Reference in New Issue
Block a user