iliaa Wed May 10 13:07:56 2006 UTC Modified files: /php-src/ext/standard string.c Log: MFB: Fixed bug #37394 (substr_compare() returns an error when offset equals string length). http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/string.c?r1=1.541&r2=1.542&diff_format=u Index: php-src/ext/standard/string.c diff -u php-src/ext/standard/string.c:1.541 php-src/ext/standard/string.c:1.542 --- php-src/ext/standard/string.c:1.541 Tue Apr 25 12:49:04 2006 +++ php-src/ext/standard/string.c Wed May 10 13:07:56 2006 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: string.c,v 1.541 2006/04/25 12:49:04 tony2001 Exp $ */ +/* $Id: string.c,v 1.542 2006/05/10 13:07:56 iliaa Exp $ */ /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */ @@ -6824,7 +6824,7 @@ offset = (offset < 0) ? 0 : offset; } - if ((offset + len) >= 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; }
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php