diff options
author | he <he@pkgsrc.org> | 2014-05-11 11:20:47 +0000 |
---|---|---|
committer | he <he@pkgsrc.org> | 2014-05-11 11:20:47 +0000 |
commit | 50f09c03e994e02c1acb482d86ea0834ea0f5216 (patch) | |
tree | d71d54fce89c20ed846c9a12ba48ca23aaa003ce /lang/php55 | |
parent | 8e1a047f77edb72f8ee92a13971d2eba49fa8a49 (diff) | |
download | pkgsrc-50f09c03e994e02c1acb482d86ea0834ea0f5216.tar.gz |
Apply a patch to fix CVE-2014-2497, taken from
https://bugs.php.net/patch-display.php?bug_id=66901
Bump PKGREVISION for php-gd correspondingly.
Diffstat (limited to 'lang/php55')
-rw-r--r-- | lang/php55/distinfo | 3 | ||||
-rw-r--r-- | lang/php55/patches/patch-ext_gd_libgd_gdxpm.c | 31 |
2 files changed, 33 insertions, 1 deletions
diff --git a/lang/php55/distinfo b/lang/php55/distinfo index 209b7f426f4..1eaf3c9c647 100644 --- a/lang/php55/distinfo +++ b/lang/php55/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.20 2014/05/01 15:52:33 taca Exp $ +$NetBSD: distinfo,v 1.21 2014/05/11 11:20:47 he Exp $ SHA1 (php-5.5.12.tar.bz2) = eaa0b27368f98af2fa9aa6f08d7ea23bdb53c748 RMD160 (php-5.5.12.tar.bz2) = c09c98e85c503cf030b0f215fcab0986945ce7ba @@ -8,6 +8,7 @@ SHA1 (patch-aclocal.m4) = 14ae2898e1d68b552e76a7e4ee7006f1aee1f932 SHA1 (patch-build_libtool.m4) = 6ee935c55cc01704c6e9edb4e383b2ddb7c746e7 SHA1 (patch-configure) = 7b4bef368e6709c26c0db31a4c7ebc04e4d55e9c SHA1 (patch-ext_gd_config.m4) = 91c9798333d4776856a0a9e20196986856b758b2 +SHA1 (patch-ext_gd_libgd_gdxpm.c) = 9a175417fad9ac23037a24122f8d1258b9eebbcb SHA1 (patch-ext_imap_config.m4) = 01681e8b54ee586ec4db72a5da2d0aec3fa89fcc SHA1 (patch-ext_mssql_php__mssql.c) = 4ef1837850443e9db2e71620a3ddaed5ab5c435b SHA1 (patch-ext_opcache_config.m4) = 7c0d98feaeec8a0ca61f6f77a1906aa2d601be3f diff --git a/lang/php55/patches/patch-ext_gd_libgd_gdxpm.c b/lang/php55/patches/patch-ext_gd_libgd_gdxpm.c new file mode 100644 index 00000000000..69500e3e012 --- /dev/null +++ b/lang/php55/patches/patch-ext_gd_libgd_gdxpm.c @@ -0,0 +1,31 @@ +$NetBSD: patch-ext_gd_libgd_gdxpm.c,v 1.1 2014/05/11 11:20:47 he Exp $ + +Patch to fix CVE-2014-2497, taken from +https://bugs.php.net/patch-display.php?bug_id=66901 + +--- ext/gd/libgd/gdxpm.c.orig 2014-04-29 08:04:30.000000000 +0000 ++++ ext/gd/libgd/gdxpm.c +@@ -39,6 +39,13 @@ gdImagePtr gdImageCreateFromXpm (char *f + number = image.ncolors; + colors = (int *) safe_emalloc(number, sizeof(int), 0); + for (i = 0; i < number; i++) { ++ if (!image.colorTable[i].c_color) ++ { ++ /* unsupported color key or color key not defined */ ++ gdImageDestroy(im); ++ im = 0; ++ goto done; ++ } + switch (strlen (image.colorTable[i].c_color)) { + case 4: + buf[1] = '\0'; +@@ -125,8 +132,8 @@ gdImagePtr gdImageCreateFromXpm (char *f + } + } + +- gdFree(colors); + done: ++ gdFree(colors); + XpmFreeXpmImage(&image); + XpmFreeXpmInfo(&info); + return im; |