FAQ
hirokawa Sat Feb 16 08:25:11 2008 UTC

Modified files: (Branch: PHP_5_2)
/php-src/ext/mbstring mbstring.c
Log:
MF PHP5_3

http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/mbstring.c?r1=1.224.2.22.2.27&r2=1.224.2.22.2.28&diff_format=u
Index: php-src/ext/mbstring/mbstring.c
diff -u php-src/ext/mbstring/mbstring.c:1.224.2.22.2.27 php-src/ext/mbstring/mbstring.c:1.224.2.22.2.28
--- php-src/ext/mbstring/mbstring.c:1.224.2.22.2.27 Mon Dec 31 07:20:07 2007
+++ php-src/ext/mbstring/mbstring.c Sat Feb 16 08:25:11 2008
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/

-/* $Id: mbstring.c,v 1.224.2.22.2.27 2007/12/31 07:20:07 sebastian Exp $ */
+/* $Id: mbstring.c,v 1.224.2.22.2.28 2008/02/16 08:25:11 hirokawa Exp $ */

/*
* PHP 4 Multibyte String module "mbstring"
@@ -888,6 +888,8 @@
const struct mb_overload_def *p;

MBSTRG(current_language) = MBSTRG(language);
+ php_mb_nls_get_default_detect_order_list(MBSTRG(language),
+ &MBSTRG(default_detect_order_list), &MBSTRG(default_detect_order_list_size));

if (MBSTRG(internal_encoding) == mbfl_no_encoding_invalid) {
char *default_enc = NULL;

Search Discussions

  • Rui Hirokawa at Feb 17, 2008 at 1:59 am
    hirokawa Sun Feb 17 01:59:03 2008 UTC

    Modified files: (Branch: PHP_5_2)
    /php-src/ext/mbstring mbstring.c
    Log:
    MF PHP5_3 (fixed #43840)

    http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/mbstring.c?r1=1.224.2.22.2.28&r2=1.224.2.22.2.29&diff_format=u
    Index: php-src/ext/mbstring/mbstring.c
    diff -u php-src/ext/mbstring/mbstring.c:1.224.2.22.2.28 php-src/ext/mbstring/mbstring.c:1.224.2.22.2.29
    --- php-src/ext/mbstring/mbstring.c:1.224.2.22.2.28 Sat Feb 16 08:25:11 2008
    +++ php-src/ext/mbstring/mbstring.c Sun Feb 17 01:59:03 2008
    @@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
    */

    -/* $Id: mbstring.c,v 1.224.2.22.2.28 2008/02/16 08:25:11 hirokawa Exp $ */
    +/* $Id: mbstring.c,v 1.224.2.22.2.29 2008/02/17 01:59:03 hirokawa Exp $ */

    /*
    * PHP 4 Multibyte String module "mbstring"
    @@ -1613,7 +1613,7 @@
    }
    }

    - if (offset < 0 || (unsigned long)offset > haystack.len) {
    + if (offset < 0 || (unsigned long)offset > (unsigned long)mbfl_strlen(&haystack)) {
    php_error_docref(NULL TSRMLS_CC, E_WARNING, "Offset not contained in string.");
    RETURN_FALSE;
    }
  • Rui Hirokawa at Feb 17, 2008 at 2:06 am
    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);
  • Dmitry Stogov at Feb 18, 2008 at 9:10 am
    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);

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupphp-cvs @
categoriesphp
postedFeb 16, '08 at 8:25a
activeFeb 18, '08 at 9:10a
posts4
users2
websitephp.net

2 users in discussion

Rui Hirokawa: 3 posts Dmitry Stogov: 1 post

People

Translate

site design / logo © 2019 Grokbase