diff options
author | Dirk Meyer <dinoex@FreeBSD.org> | 2004-11-21 12:29:31 +0000 |
---|---|---|
committer | Dirk Meyer <dinoex@FreeBSD.org> | 2004-11-21 12:29:31 +0000 |
commit | b3180215a4b33bb899eab2a10b579b2ee74809e7 (patch) | |
tree | a88c32e9f5d1ba07553d90bba8ce18582f840eac /graphics/gd | |
parent | Add p5-FreeBSD-Portindex 1.1, incremental FreeBSD ports INDEX file (diff) |
http://people.freebsd.org/~josef/stuff/patch-gd_png.c
- fixes allocation bug for webpng (RT Ticket #159)
Submitted by: josef
Notes
Notes:
svn path=/head/; revision=122071
Diffstat (limited to 'graphics/gd')
-rw-r--r-- | graphics/gd/Makefile | 1 | ||||
-rw-r--r-- | graphics/gd/files/patch-gd_png.c | 18 |
2 files changed, 19 insertions, 0 deletions
diff --git a/graphics/gd/Makefile b/graphics/gd/Makefile index 6e5ce1cd9877..4e79c0b78454 100644 --- a/graphics/gd/Makefile +++ b/graphics/gd/Makefile @@ -7,6 +7,7 @@ PORTNAME= gd PORTVERSION= 2.0.33 +PORTREVISION?= 1 PORTEPOCH= 1 CATEGORIES+= graphics MASTER_SITES= http://www.boutell.com/gd/http/ \ 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)) + { |