diff options
author | Moriyoshi Koizumi <moriyoshi@php.net> | 2003-01-21 19:32:18 +0000 |
---|---|---|
committer | Moriyoshi Koizumi <moriyoshi@php.net> | 2003-01-21 19:32:18 +0000 |
commit | 77821ecb7593d2b09138adc75b8b78608a8adf31 (patch) | |
tree | f8e21c6a9095a2c2dd8ce8eddb46475191eafb89 /ext/mbstring/php_mbregex.c | |
parent | 8fdf6abb81e7363f5040dc70d366531907f45496 (diff) | |
download | php-git-77821ecb7593d2b09138adc75b8b78608a8adf31.tar.gz |
MFH: fixed mb_ereg_search() segfault
Diffstat (limited to 'ext/mbstring/php_mbregex.c')
-rw-r--r-- | ext/mbstring/php_mbregex.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/mbstring/php_mbregex.c b/ext/mbstring/php_mbregex.c index 8d4dd20ccb..b4c12142e1 100644 --- a/ext/mbstring/php_mbregex.c +++ b/ext/mbstring/php_mbregex.c @@ -770,7 +770,7 @@ _php_mb_regex_ereg_search_exec(INTERNAL_FUNCTION_PARAMETERS, int mode) pos = MBSTRG(search_pos); str = NULL; len = 0; - if (Z_TYPE_PP(MBSTRG(search_str)) == IS_STRING){ + if (MBSTRG(search_str) != NULL && Z_TYPE_PP(MBSTRG(search_str)) == IS_STRING){ str = (unsigned char *)Z_STRVAL_PP(MBSTRG(search_str)); len = Z_STRLEN_PP(MBSTRG(search_str)); } |