iliaa           Wed May 10 13:07:15 2006 UTC

  Modified files:              (Branch: PHP_5_2)
    /php-src    NEWS 
    /php-src/ext/standard       string.c 
  Log:
  Fixed bug #37394 (substr_compare() returns an error when offset equals 
  string length).
  
  
http://cvs.php.net/viewcvs.cgi/php-src/NEWS?r1=1.2027.2.547.2.10&r2=1.2027.2.547.2.11&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.10 php-src/NEWS:1.2027.2.547.2.11
--- php-src/NEWS:1.2027.2.547.2.10      Wed May 10 10:07:28 2006
+++ php-src/NEWS        Wed May 10 13:07:15 2006
@@ -15,6 +15,8 @@
 - Added support for Apache 2.2 handler in the Windows distro. (Edin)
 - Added pg_field_table() function. (Edin)
 - Add implementation of curl_multi_info_read (Brian)
+- Fixed bug #37394 (substr_compare() returns an error when offset equals 
+  string length). (Ilia)
 - Fixed bug #37392 (Unnecessary call to OCITransRollback() at the end of 
   request). (Tony)
 - Fixed bug #37376 (fastcgi.c compile fail with gcc 2.95.4). (Ilia)
http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/string.c?r1=1.445.2.14&r2=1.445.2.14.2.1&diff_format=u
Index: php-src/ext/standard/string.c
diff -u php-src/ext/standard/string.c:1.445.2.14 
php-src/ext/standard/string.c:1.445.2.14.2.1
--- php-src/ext/standard/string.c:1.445.2.14    Tue Apr 25 12:48:41 2006
+++ php-src/ext/standard/string.c       Wed May 10 13:07:15 2006
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: string.c,v 1.445.2.14 2006/04/25 12:48:41 tony2001 Exp $ */
+/* $Id: string.c,v 1.445.2.14.2.1 2006/05/10 13:07:15 iliaa Exp $ */
 
 /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */
 
@@ -4894,7 +4894,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

Reply via email to