summaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
authoradrianp <adrianp>2006-11-04 11:19:41 +0000
committeradrianp <adrianp>2006-11-04 11:19:41 +0000
commitcfb6fc17e3478b01bacb4e60ed893958d1d45486 (patch)
tree3a32c3f048e128ce684285734399a47b0296253c /www
parent0992a70865a3b50a9b2102ace4546e087a92d2e1 (diff)
downloadpkgsrc-cfb6fc17e3478b01bacb4e60ed893958d1d45486.tar.gz
Fix for CVE-2006-5465 from PHP CVS
http://www.hardened-php.net/advisory_132006.138.html
Diffstat (limited to 'www')
-rw-r--r--www/php4/Makefile4
-rw-r--r--www/php4/distinfo3
-rw-r--r--www/php4/patches/patch-av32
3 files changed, 36 insertions, 3 deletions
diff --git a/www/php4/Makefile b/www/php4/Makefile
index f5315fb2ccd..d5950569844 100644
--- a/www/php4/Makefile
+++ b/www/php4/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.72 2006/10/22 13:16:41 adrianp Exp $
+# $NetBSD: Makefile,v 1.73 2006/11/04 11:19:41 adrianp Exp $
PKGNAME= php-${PHP_BASE_VERS}
-PKGREVISION= 2
+PKGREVISION= 3
CATEGORIES+= lang
COMMENT= HTML-embedded scripting language
diff --git a/www/php4/distinfo b/www/php4/distinfo
index 03d044df8bf..35b255cec07 100644
--- a/www/php4/distinfo
+++ b/www/php4/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.59 2006/11/03 07:00:39 wiz Exp $
+$NetBSD: distinfo,v 1.60 2006/11/04 11:19:41 adrianp Exp $
SHA1 (php-4.4.4.tar.bz2) = 05d62910fb5734344db87f0a17b1e8e001b26b05
RMD160 (php-4.4.4.tar.bz2) = 02fd7d5135a9e5ce11d905a4a474a5d42b8441f3
@@ -17,3 +17,4 @@ SHA1 (patch-ao) = 0fd4becf023451ac8cb185df354830efc86c1344
SHA1 (patch-ap) = 2f852abd1e9d0f089add18b2eade2831253ad00e
SHA1 (patch-at) = f8b3aebd61fe2d5b5a994e1d973424a1ed397f63
SHA1 (patch-au) = 8b8e317dbb9cfc265bf29ebe0827d9b734a1a3b7
+SHA1 (patch-av) = d2e828caa542288d5444cf9d39f3aa0fa7a6f438
diff --git a/www/php4/patches/patch-av b/www/php4/patches/patch-av
new file mode 100644
index 00000000000..18689fc693a
--- /dev/null
+++ b/www/php4/patches/patch-av
@@ -0,0 +1,32 @@
+$NetBSD: patch-av,v 1.3 2006/11/04 11:19:41 adrianp Exp $
+
+# CVE-2006-5465
+
+--- ext/standard/html.c.orig 2006-02-25 21:33:06.000000000 +0000
++++ ext/standard/html.c
+@@ -878,7 +878,7 @@ PHPAPI char *php_escape_html_entities(un
+
+ matches_map = 0;
+
+- if (len + 9 > maxlen)
++ if (len + 16 > maxlen)
+ replaced = erealloc (replaced, maxlen += 128);
+
+ if (all) {
+@@ -903,9 +903,15 @@ PHPAPI char *php_escape_html_entities(un
+ }
+
+ if (matches_map) {
++ int l = strlen(rep);
++ /* increase the buffer size */
++ if (len + 2 + l >= maxlen) {
++ replaced = erealloc(replaced, maxlen += 128);
++ }
++
+ replaced[len++] = '&';
+ strcpy(replaced + len, rep);
+- len += strlen(rep);
++ len += l;
+ replaced[len++] = ';';
+ }
+ }