diff options
author | Moriyoshi Koizumi <moriyoshi@php.net> | 2003-04-03 00:15:58 +0000 |
---|---|---|
committer | Moriyoshi Koizumi <moriyoshi@php.net> | 2003-04-03 00:15:58 +0000 |
commit | e64002e9efc65bc92af49fded29fa7322709a342 (patch) | |
tree | f0bc873ec74b806030bc724a268cb950312d031a /ext/mbstring/php_mbregex.c | |
parent | 043a1f5b36a3cef1a2bf4c58d4bfffa235d9a07f (diff) | |
download | php-git-e64002e9efc65bc92af49fded29fa7322709a342.tar.gz |
MFH(r-1.38): fixed segfault in mb_ereg_match()
Diffstat (limited to 'ext/mbstring/php_mbregex.c')
-rw-r--r-- | ext/mbstring/php_mbregex.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/ext/mbstring/php_mbregex.c b/ext/mbstring/php_mbregex.c index ca65e06c77..450fadf6f7 100644 --- a/ext/mbstring/php_mbregex.c +++ b/ext/mbstring/php_mbregex.c @@ -685,7 +685,8 @@ PHP_FUNCTION(mb_split) Regular expression match for multibyte string */ PHP_FUNCTION(mb_ereg_match) { - zval *arg_pattern; + char *arg_pattern; + int arg_pattern_len; char *string; int string_len; @@ -698,8 +699,8 @@ PHP_FUNCTION(mb_ereg_match) char *option_str = NULL; int option_str_len = 0; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "zs|s", - &arg_pattern, &string, &string_len, + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|s", + &arg_pattern, &arg_pattern_len, &string, &string_len, &option_str, &option_str_len)==FAILURE) { RETURN_FALSE; } @@ -710,12 +711,11 @@ PHP_FUNCTION(mb_ereg_match) option |= MBSTRG(regex_default_options); } } - convert_to_string_ex(&arg_pattern); err = php_mbregex_compile_pattern( &re, - Z_STRVAL_P(arg_pattern), - Z_STRLEN_P(arg_pattern), + arg_pattern, + arg_pattern_len, option, MBSTRG(current_mbctype) TSRMLS_CC); if (err) { |