diff options
author | Jorge Arellano Cid <jcid@dillo.org> | 2009-06-19 19:07:47 -0400 |
---|---|---|
committer | Jorge Arellano Cid <jcid@dillo.org> | 2009-06-19 19:07:47 -0400 |
commit | d1e9237fdaf8a2e5ba5993fbd0efa9a016b4cc6e (patch) | |
tree | 6825edd02e38a175eaa4fcd35f8cb722d59b8706 /src/png.c | |
parent | 30ef110e2384e0ad26c2131b9d530f53954bcde9 (diff) |
Added image size sanity checksrelease-2_1
Diffstat (limited to 'src/png.c')
-rw-r--r-- | src/png.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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); |