aboutsummaryrefslogtreecommitdiffstats
path: root/graphics/png
diff options
context:
space:
mode:
authordinoex <dinoex@FreeBSD.org>2012-02-17 22:26:02 +0800
committerdinoex <dinoex@FreeBSD.org>2012-02-17 22:26:02 +0800
commit7965bac89b21a481e13db8969126aa4b4cd713e8 (patch)
tree035a6148eb6f2eb7fa2c78061aa7573c83bedde1 /graphics/png
parent3c3910187daa9df3434ba481511f638428f5da84 (diff)
downloadfreebsd-ports-gnome-7965bac89b21a481e13db8969126aa4b4cd713e8.tar.gz
freebsd-ports-gnome-7965bac89b21a481e13db8969126aa4b4cd713e8.tar.zst
freebsd-ports-gnome-7965bac89b21a481e13db8969126aa4b4cd713e8.zip
- Security patch
Security: CVE-2011-3026 Obtained from: Debian
Diffstat (limited to 'graphics/png')
-rw-r--r--graphics/png/Makefile1
-rw-r--r--graphics/png/files/patch-pngrutil.c20
2 files changed, 21 insertions, 0 deletions
diff --git a/graphics/png/Makefile b/graphics/png/Makefile
index 63af3dc525be..bd8456327e00 100644
--- a/graphics/png/Makefile
+++ b/graphics/png/Makefile
@@ -7,6 +7,7 @@
PORTNAME= png
PORTVERSION= 1.4.8
+PORTREVISION= 1
CATEGORIES= graphics
MASTER_SITES= SF/lib${PORTNAME}/lib${PORTNAME}14/${PORTVERSION}
DISTNAME= lib${PORTNAME}-${PORTVERSION}
diff --git a/graphics/png/files/patch-pngrutil.c b/graphics/png/files/patch-pngrutil.c
new file mode 100644
index 000000000000..677cbfd3919b
--- /dev/null
+++ b/graphics/png/files/patch-pngrutil.c
@@ -0,0 +1,20 @@
+---pngrutil.c.orig 2012/02/10 19:43:42 121491
++++ pngrutil.c 2012/02/10 19:45:46 121492
+@@ -363,8 +363,15 @@
+ {
+ /* Success (maybe) - really uncompress the chunk. */
+ png_size_t new_size = 0;
+- png_charp text = png_malloc_warn(png_ptr,
+- prefix_size + expanded_size + 1);
++ png_charp text = NULL;
++ /* Need to check for both truncation (64-bit platforms) and integer
++ * overflow.
++ */
++ if (prefix_size + expanded_size > prefix_size &&
++ prefix_size + expanded_size < 0xffffffffU)
++ {
++ text = png_malloc_warn(png_ptr, prefix_size + expanded_size + 1);
++ }
+
+ if (text != NULL)
+ {