summaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
authorrillig <rillig@pkgsrc.org>2018-02-25 14:34:22 +0000
committerrillig <rillig@pkgsrc.org>2018-02-25 14:34:22 +0000
commit6aec161d5c125afe49cc7fa37039eeefa313386d (patch)
tree9625ef93af94c13c50c1bd609c34fe192e10b459 /graphics
parent560ef110809807d5b7d4e97d90a2cdd9cae4f67a (diff)
downloadpkgsrc-6aec161d5c125afe49cc7fa37039eeefa313386d.tar.gz
graphics/gd: fix undefined behavior in ctype functions
Diffstat (limited to 'graphics')
-rw-r--r--graphics/gd/Makefile5
-rw-r--r--graphics/gd/distinfo3
-rwxr-xr-xgraphics/gd/patches/patch-src_gd__xbm.c18
3 files changed, 23 insertions, 3 deletions
diff --git a/graphics/gd/Makefile b/graphics/gd/Makefile
index 587bba6c66d..b28d4ab0022 100644
--- a/graphics/gd/Makefile
+++ b/graphics/gd/Makefile
@@ -1,13 +1,14 @@
-# $NetBSD: Makefile,v 1.116 2017/09/04 06:20:45 adam Exp $
+# $NetBSD: Makefile,v 1.117 2018/02/25 14:34:22 rillig Exp $
DISTNAME= libgd-2.2.5
PKGNAME= ${DISTNAME:S/libgd/gd/}
+PKGREVISION= 1
CATEGORIES= graphics
MASTER_SITES= ${MASTER_SITE_GITHUB:=libgd/}
EXTRACT_SUFX= .tar.xz
MAINTAINER= adam@NetBSD.org
-HOMEPAGE= http://libgd.bitbucket.org/
+HOMEPAGE= https://libgd.github.io/
COMMENT= Graphics library for the dynamic creation of images
GITHUB_PROJECT= libgd
diff --git a/graphics/gd/distinfo b/graphics/gd/distinfo
index 8399cd788e6..06393bc62f7 100644
--- a/graphics/gd/distinfo
+++ b/graphics/gd/distinfo
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.45 2017/09/04 06:20:45 adam Exp $
+$NetBSD: distinfo,v 1.46 2018/02/25 14:34:22 rillig Exp $
SHA1 (libgd-2.2.5.tar.xz) = b777b005c401b6fa310ccf09eeb29f6c6e17ab2c
RMD160 (libgd-2.2.5.tar.xz) = 1c20f719161da596dac6c5c5b92bde71ddc9aedb
SHA512 (libgd-2.2.5.tar.xz) = e4598e17a277a75e02255402182cab139cb3f2cffcd68ec05cc10bbeaf6bc7aa39162c3445cd4a7efc1a26b72b9152bbedb187351e3ed099ea51767319997a6b
Size (libgd-2.2.5.tar.xz) = 2594092 bytes
+SHA1 (patch-src_gd__xbm.c) = 948942243b97a8e96838447ea1325a28ac8c828a
diff --git a/graphics/gd/patches/patch-src_gd__xbm.c b/graphics/gd/patches/patch-src_gd__xbm.c
new file mode 100755
index 00000000000..34ac9cfccbc
--- /dev/null
+++ b/graphics/gd/patches/patch-src_gd__xbm.c
@@ -0,0 +1,18 @@
+$NetBSD: patch-src_gd__xbm.c,v 1.1 2018/02/25 14:34:22 rillig Exp $
+
+Fix undefined behavior while using <ctype.h> functions.
+
+See https://github.com/libgd/libgd/pull/433
+
+--- src/gd_xbm.c.orig 2017-08-30 11:05:54.000000000 +0000
++++ src/gd_xbm.c
+@@ -239,7 +239,8 @@ BGD_DECLARE(void) gdImageXbmCtx(gdImageP
+ } else {
+ for (i=0; i<l; i++) {
+ /* only in C-locale isalnum() would work */
+- if (!isupper(name[i]) && !islower(name[i]) && !isdigit(name[i])) {
++ unsigned char ch = name[i];
++ if (!isupper(ch) && !islower(ch) && !isdigit(ch)) {
+ name[i] = '_';
+ }
+ }