summaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
authorwiz <wiz@pkgsrc.org>2012-02-20 22:42:29 +0000
committerwiz <wiz@pkgsrc.org>2012-02-20 22:42:29 +0000
commit5e6e0f5b7d88f444e026a2a603e690743788ffe7 (patch)
tree0c6dd159b44f8a4eef9e3134b43ac0ad3d9509b7 /graphics
parent8c762cbcc74d0cd42aded6bc940a13e746ea35ab (diff)
downloadpkgsrc-5e6e0f5b7d88f444e026a2a603e690743788ffe7.tar.gz
Set some defaults so that CVE-2011-3026 will not repeat,
following suggestions from upstream. Bump PKGREVISION.
Diffstat (limited to 'graphics')
-rw-r--r--graphics/png/Makefile5
-rw-r--r--graphics/png/distinfo3
-rw-r--r--graphics/png/patches/patch-pngread.c15
3 files changed, 21 insertions, 2 deletions
diff --git a/graphics/png/Makefile b/graphics/png/Makefile
index d46885fd3df..139c5b25bbd 100644
--- a/graphics/png/Makefile
+++ b/graphics/png/Makefile
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.146 2012/02/19 09:26:39 tron Exp $
+# $NetBSD: Makefile,v 1.147 2012/02/20 22:42:29 wiz Exp $
DISTNAME= libpng-1.5.9
PKGNAME= ${DISTNAME:S/lib//}
+PKGREVISION= 1
CATEGORIES= graphics
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=libpng/} \
ftp://ftp.fu-berlin.de/unix/graphics/png/src/
@@ -20,6 +21,8 @@ PKGCONFIG_OVERRIDE= scripts/libpng.pc.in libpng.pc.in
TEST_TARGET= check
USE_LIBTOOL= yes
+CPPFLAGS+= -DPNG_USER_CHUNK_CACHE_MAX=128 -DPNG_USER_CHUNK_MALLOC_MAX=8000000
+
.include "../../mk/bsd.prefs.mk"
# keep this in sync with the same code in buildlink3.mk
.if ${MACHINE_ARCH} != "i386" && ${MACHINE_ARCH} != "x86_64"
diff --git a/graphics/png/distinfo b/graphics/png/distinfo
index 8129acf0825..e1c8ce06ef8 100644
--- a/graphics/png/distinfo
+++ b/graphics/png/distinfo
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.93 2012/02/19 09:26:39 tron Exp $
+$NetBSD: distinfo,v 1.94 2012/02/20 22:42:29 wiz Exp $
SHA1 (libpng-1.5.9.tar.bz2) = 844e6ebc739a332178a327e74ff7c42ddb93f442
RMD160 (libpng-1.5.9.tar.bz2) = 02404bcbc695964c951905a489f1f0654b62670b
Size (libpng-1.5.9.tar.bz2) = 865782 bytes
SHA1 (patch-aa) = aaf79ebb8a18448c096c17ae9b02da02bc537db2
+SHA1 (patch-pngread.c) = e824c26fdf2d868fc19816f5254e9d54b6f3ccda
diff --git a/graphics/png/patches/patch-pngread.c b/graphics/png/patches/patch-pngread.c
new file mode 100644
index 00000000000..ab50e894eac
--- /dev/null
+++ b/graphics/png/patches/patch-pngread.c
@@ -0,0 +1,15 @@
+$NetBSD: patch-pngread.c,v 1.1 2012/02/20 22:42:29 wiz Exp $
+
+Fix typo in define. From John Bowler <jbowler@acm.org>.
+
+--- pngread.c.orig 2012-02-18 20:31:14.000000000 +0000
++++ pngread.c
+@@ -72,7 +72,7 @@ png_create_read_struct_2,(png_const_char
+ png_ptr->user_chunk_cache_max = PNG_USER_CHUNK_CACHE_MAX;
+ # endif
+
+-# ifdef PNG_SET_USER_CHUNK_MALLOC_MAX
++# ifdef PNG_USER_CHUNK_MALLOC_MAX
+ /* Added at libpng-1.2.43 and 1.4.1 */
+ png_ptr->user_chunk_malloc_max = PNG_USER_CHUNK_MALLOC_MAX;
+ # endif