iliaa           Sat Mar 10 20:07:51 2007 UTC

  Modified files:              (Branch: PHP_5_2)
    /php-src/ext/standard       string.c 
  Log:
  Re-added check removed by the previous patch
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/string.c?r1=1.445.2.14.2.51&r2=1.445.2.14.2.52&diff_format=u
Index: php-src/ext/standard/string.c
diff -u php-src/ext/standard/string.c:1.445.2.14.2.51 
php-src/ext/standard/string.c:1.445.2.14.2.52
--- php-src/ext/standard/string.c:1.445.2.14.2.51       Fri Mar  9 10:04:59 2007
+++ php-src/ext/standard/string.c       Sat Mar 10 20:07:50 2007
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: string.c,v 1.445.2.14.2.51 2007/03/09 10:04:59 tony2001 Exp $ */
+/* $Id: string.c,v 1.445.2.14.2.52 2007/03/10 20:07:50 iliaa Exp $ */
 
 /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */
 
@@ -2065,6 +2065,8 @@
                l = Z_LVAL_PP(len);
                if ((l < 0 && -l > Z_STRLEN_PP(str))) {
                        RETURN_FALSE;
+               } else if (l > Z_STRLEN_PP(str)) {
+                       l = Z_STRLEN_PP(str);
                }
        } else {
                l = Z_STRLEN_PP(str);

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to