iliaa Tue Mar 14 14:55:14 2006 UTC Modified files: (Branch: PHP_5_1) /php-src/ext/standard string.c /php-src NEWS Log: Fixed offset/length parameter validation in substr_compare() function. http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/string.c?r1=1.445.2.10&r2=1.445.2.11&diff_format=u Index: php-src/ext/standard/string.c diff -u php-src/ext/standard/string.c:1.445.2.10 php-src/ext/standard/string.c:1.445.2.11 --- php-src/ext/standard/string.c:1.445.2.10 Mon Mar 13 14:37:10 2006 +++ php-src/ext/standard/string.c Tue Mar 14 14:55:13 2006 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: string.c,v 1.445.2.10 2006/03/13 14:37:10 iliaa Exp $ */ +/* $Id: string.c,v 1.445.2.11 2006/03/14 14:55:13 iliaa Exp $ */ /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */ @@ -4884,7 +4884,7 @@ RETURN_FALSE; } - if (len && offset >= s1_len) { + if (offset + len >= s1_len) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "The start position cannot exceed initial string length."); RETURN_FALSE; } http://cvs.php.net/viewcvs.cgi/php-src/NEWS?r1=1.2027.2.459&r2=1.2027.2.460&diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.459 php-src/NEWS:1.2027.2.460 --- php-src/NEWS:1.2027.2.459 Tue Mar 14 14:19:00 2006 +++ php-src/NEWS Tue Mar 14 14:55:13 2006 @@ -1,6 +1,7 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? Mar 2006, PHP 5.1.3RC2 +- Fixed offset/length parameter validation in substr_compare() function. (Ilia) - Added overflow checks to wordwrap() function. (Ilia) - Removed the E_STRICT deprecation notice from "var". (Ilia) - Fixed debug_zval_dump() to support private and protected members. (Dmitry)
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php