Commit | Line | Data |
---|---|---|
f956d661 MW |
1 | Copied from Fedora. |
2 | ||
3 | http://pkgs.fedoraproject.org/cgit/libwmf.git/tree/libwmf-0.2.8.4-CAN-2004-0941.patch | |
4 | ||
5 | --- libwmf-0.2.8.4/src/extra/gd/gd_png.c 2004-11-11 14:02:37.407589824 -0500 | |
6 | +++ libwmf-0.2.8.4/src/extra/gd/gd_png.c 2004-11-11 14:04:29.672522960 -0500 | |
7 | @@ -188,6 +188,14 @@ | |
8 | ||
9 | png_get_IHDR (png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, | |
10 | &interlace_type, NULL, NULL); | |
11 | + if (overflow2(sizeof (int), width)) | |
12 | + { | |
13 | + return NULL; | |
14 | + } | |
15 | + if (overflow2(sizeof (int) * width, height)) | |
16 | + { | |
17 | + return NULL; | |
18 | + } | |
19 | if ((color_type == PNG_COLOR_TYPE_RGB) || | |
20 | (color_type == PNG_COLOR_TYPE_RGB_ALPHA)) | |
21 | { |