aboutsummaryrefslogtreecommitdiffstats
path: root/graphics/gd/files
diff options
context:
space:
mode:
authordinoex <dinoex@FreeBSD.org>2004-11-21 20:29:31 +0800
committerdinoex <dinoex@FreeBSD.org>2004-11-21 20:29:31 +0800
commitbd92cea27e314e577275332605d72d23b21cf696 (patch)
treef645072d687b4a3226a04c8c744b6dc033d28411 /graphics/gd/files
parent692c603874f320d918cab7864faae74bf22c8278 (diff)
downloadfreebsd-ports-gnome-bd92cea27e314e577275332605d72d23b21cf696.tar.gz
freebsd-ports-gnome-bd92cea27e314e577275332605d72d23b21cf696.tar.zst
freebsd-ports-gnome-bd92cea27e314e577275332605d72d23b21cf696.zip
http://people.freebsd.org/~josef/stuff/patch-gd_png.c
- fixes allocation bug for webpng (RT Ticket #159) Submitted by: josef
Diffstat (limited to 'graphics/gd/files')
-rw-r--r--graphics/gd/files/patch-gd_png.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/graphics/gd/files/patch-gd_png.c b/graphics/gd/files/patch-gd_png.c
new file mode 100644
index 000000000000..079dd1921e2e
--- /dev/null
+++ b/graphics/gd/files/patch-gd_png.c
@@ -0,0 +1,18 @@
+--- gd_png.c.orig Sat Nov 20 01:30:53 2004
++++ gd_png.c Sat Nov 20 01:30:58 2004
+@@ -188,6 +188,15 @@
+
+ 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))
+ {