summaryrefslogtreecommitdiff
path: root/src/png.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/png.c')
-rw-r--r--src/png.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/png.c b/src/png.c
index 2184dd01..3015f9d2 100644
--- a/src/png.c
+++ b/src/png.c
@@ -137,6 +137,8 @@ Png_datainfo_callback(png_structp png_ptr, png_infop info_ptr)
png_get_IHDR(png_ptr, info_ptr, &png->width, &png->height,
&bit_depth, &color_type, &interlace_type, NULL, NULL);
+
+ /* check max image size */
if (abs(png->width*png->height) > IMAGE_MAX_W * IMAGE_MAX_H) {
MSG("Png_datainfo_callback: suspicious image size request %ldx%ld\n",
png->width, png->height);