Hi Rui,

Your commits broke several ext/mbstring tests.
I assume you broke them in "proper" way. :)
Could you please look into them, and fix test files or code.

Thanks. Dmitry.

Rui Hirokawa wrote:
hirokawa                Sun Feb 17 02:06:56 2008 UTC

  Modified files:              (Branch: PHP_5_2)
/php-src/ext/mbstring mbstring.c Log:
  MF PHP5_3 (fixed #43841)
http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/mbstring.c?r1=1.224.2.22.2.29&r2=1.224.2.22.2.30&diff_format=u
Index: php-src/ext/mbstring/mbstring.c
diff -u php-src/ext/mbstring/mbstring.c:1.224.2.22.2.29 
php-src/ext/mbstring/mbstring.c:1.224.2.22.2.30
--- php-src/ext/mbstring/mbstring.c:1.224.2.22.2.29     Sun Feb 17 01:59:03 2008
+++ php-src/ext/mbstring/mbstring.c     Sun Feb 17 02:06:56 2008
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
  */
-/* $Id: mbstring.c,v 1.224.2.22.2.29 2008/02/17 01:59:03 hirokawa Exp $ */
+/* $Id: mbstring.c,v 1.224.2.22.2.30 2008/02/17 02:06:56 hirokawa Exp $ */
/*
  * PHP 4 Multibyte String module "mbstring"
@@ -1726,6 +1726,13 @@
        if (needle.len <= 0) {
                RETURN_FALSE;
        }
+
+       if ((offset > 0 && offset > mbfl_strlen(&haystack)) ||
+               (offset < 0 && -offset > mbfl_strlen(&haystack))) {
+               php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Offset is greater than 
the length of haystack string");
+               RETURN_FALSE;
+       }
+
        n = mbfl_strpos(&haystack, &needle, offset, 1);
        if (n >= 0) {
                RETVAL_LONG(n);


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

Reply via email to