]> granicus.if.org Git - php/commitdiff
Fix wrong Unicode string length (bytes) in tidy_parse_string()
authorHenrique do Nascimento Angelo <hnangelo@php.net>
Fri, 29 Aug 2008 22:59:41 +0000 (22:59 +0000)
committerHenrique do Nascimento Angelo <hnangelo@php.net>
Fri, 29 Aug 2008 22:59:41 +0000 (22:59 +0000)
ext/tidy/tidy.c

index 2e41c0e5ce19115e9f5a6d2814262c038627bb42..573eaa1111b0041816f146d54f24e763a10e1b52 100644 (file)
@@ -1313,7 +1313,7 @@ static PHP_FUNCTION(tidy_parse_string)
 
        TIDY_APPLY_CONFIG_ZVAL(obj->ptdoc->doc, options);
 
-       if (php_tidy_parse_string(obj, input.s, input_len, enc TSRMLS_CC) == FAILURE) {
+       if (php_tidy_parse_string(obj, input.s, USTR_BYTES(input_type, input_len), enc TSRMLS_CC) == FAILURE) {
                zval_dtor(return_value);
                INIT_ZVAL(*return_value);
                RETVAL_FALSE;