mirror of
https://git.freebsd.org/ports.git
synced 2025-06-28 08:00:31 -04:00
- new MASTER_SITES - use smaller distfile (.bz2) - new option WITH_FONTCONFIG - new option WITH_ICONV - removed gdImageCreateFromGifSource this breaks old version of php*-gd PR: 109149 Submitted by: Phil Oleson - fix gdtest - remove gdImageLzw*, gdImageBigGif* this breaks old version of perl5-GD - extend feature info
19 lines
618 B
C
19 lines
618 B
C
--- gd_png.c.orig Sat Feb 3 02:41:00 2007
|
|
+++ gd_png.c Tue Feb 13 15:31:57 2007
|
|
@@ -189,6 +189,16 @@
|
|
png_read_info (png_ptr, info_ptr); /* read all PNG info up to image data */
|
|
|
|
png_get_IHDR (png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, &interlace_type, NULL, NULL);
|
|
+
|
|
+ if (overflow2(sizeof (int), width))
|
|
+ {
|
|
+ return NULL;
|
|
+ }
|
|
+ if (overflow2(sizeof (int) * width, height))
|
|
+ {
|
|
+ return NULL;
|
|
+ }
|
|
+
|
|
if ((color_type == PNG_COLOR_TYPE_RGB) || (color_type == PNG_COLOR_TYPE_RGB_ALPHA)) {
|
|
im = gdImageCreateTrueColor ((int) width, (int) height);
|
|
} else {
|