diff options
Diffstat (limited to 'www/php4/patches/patch-au')
-rw-r--r-- | www/php4/patches/patch-au | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/www/php4/patches/patch-au b/www/php4/patches/patch-au new file mode 100644 index 00000000000..8f7483c3602 --- /dev/null +++ b/www/php4/patches/patch-au @@ -0,0 +1,24 @@ +$NetBSD: patch-au,v 1.1 2006/07/18 21:21:19 adrianp Exp $ + +# This is CVE-2006-1990 + +--- ext/standard/string.c.orig 2006-01-01 13:46:58.000000000 +0000 ++++ ext/standard/string.c +@@ -672,15 +672,13 @@ PHP_FUNCTION(wordwrap) + /* Multiple character line break or forced cut */ + if (linelength > 0) { + chk = (int)(textlen/linelength + 1); ++ newtext = safe_emalloc(chk, breakcharlen, textlen + 1); + alloced = textlen + chk * breakcharlen + 1; + } else { + chk = textlen; ++ newtext = safe_emalloc(textlen, (breakcharlen + 1), 1); + alloced = textlen * (breakcharlen + 1) + 1; + } +- if (alloced <= 0) { +- RETURN_FALSE; +- } +- newtext = emalloc(alloced); + + /* now keep track of the actual new text length */ + newtextlen = 0; |