pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/pkgsrc-2006Q3]: pkgsrc/lang/php5 Pullup ticket 1898 - requested by ad...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/e63f69830482
branches:  pkgsrc-2006Q3
changeset: 519160:e63f69830482
user:      ghen <ghen%pkgsrc.org@localhost>
date:      Sat Nov 04 16:25:31 2006 +0000

description:
Pullup ticket 1898 - requested by adrianp
security fix for php

- pkgsrc/lang/php5/Makefile                     1.46
- pkgsrc/lang/php5/distinfo                     1.32
- pkgsrc/lang/php5/patches/patch-av             1.3

   Module Name: pkgsrc
   Committed By:        adrianp
   Date:                Sat Nov  4 11:27:55 UTC 2006

   Modified Files:
        pkgsrc/lang/php5: Makefile distinfo
   Added Files:
        pkgsrc/lang/php5/patches: patch-av

   Log Message:
   Fix for CVE-2006-5465 from PHP CVS
   http://www.hardened-php.net/advisory_132006.138.html

diffstat:

 lang/php5/Makefile         |   4 ++--
 lang/php5/distinfo         |   3 ++-
 lang/php5/patches/patch-av |  32 ++++++++++++++++++++++++++++++++
 3 files changed, 36 insertions(+), 3 deletions(-)

diffs (63 lines):

diff -r da960f54771f -r e63f69830482 lang/php5/Makefile
--- a/lang/php5/Makefile        Thu Nov 02 09:03:17 2006 +0000
+++ b/lang/php5/Makefile        Sat Nov 04 16:25:31 2006 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.43.2.1 2006/10/29 16:47:58 ghen Exp $
+# $NetBSD: Makefile,v 1.43.2.2 2006/11/04 16:25:31 ghen Exp $
 
 PKGNAME=               php-${PHP_BASE_VERS}
-PKGREVISION=           2
+PKGREVISION=           3
 CATEGORIES=            lang
 
 HOMEPAGE=              http://www.php.net/
diff -r da960f54771f -r e63f69830482 lang/php5/distinfo
--- a/lang/php5/distinfo        Thu Nov 02 09:03:17 2006 +0000
+++ b/lang/php5/distinfo        Sat Nov 04 16:25:31 2006 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.29.2.1 2006/10/29 16:47:58 ghen Exp $
+$NetBSD: distinfo,v 1.29.2.2 2006/11/04 16:25:31 ghen Exp $
 
 SHA1 (php-5.1.6/php-5.1.6.tar.bz2) = a20b946f1de0a8a35a8a6bf437adbba4e5448d27
 RMD160 (php-5.1.6/php-5.1.6.tar.bz2) = 7ac52f4674532397c982f6ced594b70dd17522af
@@ -11,3 +11,4 @@
 SHA1 (patch-ak) = 2d5264d33ebef631d4a2d0cdf8a2ed365bdbeb7e
 SHA1 (patch-as) = 4fc74c8e8d0a7a152a7bbe1672ad0834021db16c
 SHA1 (patch-au) = 90264101db6c2f000c30d1f513392acec781202b
+SHA1 (patch-av) = b14aed514e801e58deec95ecdda107a1c6b5457d
diff -r da960f54771f -r e63f69830482 lang/php5/patches/patch-av
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/php5/patches/patch-av        Sat Nov 04 16:25:31 2006 +0000
@@ -0,0 +1,32 @@
+$NetBSD: patch-av,v 1.2.2.1 2006/11/04 16:25:31 ghen Exp $
+
+# CVE-2006-5465
+
+--- ext/standard/html.c.orig   2006-02-25 21:32:11.000000000 +0000
++++ ext/standard/html.c
+@@ -1096,7 +1096,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) {
+@@ -1121,9 +1121,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++] = ';';
+                       }
+               }



Home | Main Index | Thread Index | Old Index