tony2001 Fri Jun 30 09:35:22 2006 UTC Modified files: /php-src/ext/standard string.c Log: fix off-by-one in addslashes() in Unicode mode http://cvs.php.net/viewvc.cgi/php-src/ext/standard/string.c?r1=1.546&r2=1.547&diff_format=u Index: php-src/ext/standard/string.c diff -u php-src/ext/standard/string.c:1.546 php-src/ext/standard/string.c:1.547 --- php-src/ext/standard/string.c:1.546 Sun Jun 25 19:19:31 2006 +++ php-src/ext/standard/string.c Fri Jun 30 09:35:21 2006 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: string.c,v 1.546 2006/06/25 19:19:31 bjori Exp $ */ +/* $Id: string.c,v 1.547 2006/06/30 09:35:21 tony2001 Exp $ */ /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */ @@ -4448,7 +4448,7 @@ return str; } - buf = eumalloc(length * 2); + buf = eumalloc(length * 2 + 1); while (i < length) { U16_NEXT(str, i, length, ch);
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php