diff options
author | Moriyoshi Koizumi <moriyoshi@php.net> | 2003-01-21 19:31:07 +0000 |
---|---|---|
committer | Moriyoshi Koizumi <moriyoshi@php.net> | 2003-01-21 19:31:07 +0000 |
commit | 9a723fcb4e18c185a9cb49f59bc5bd52c27f0d79 (patch) | |
tree | 6730afa6a51e0e0841125bf363e722454dced240 /ext/mbstring/php_mbregex.c | |
parent | bd55130077246478743f8704310dc69f3c469673 (diff) | |
download | php-git-9a723fcb4e18c185a9cb49f59bc5bd52c27f0d79.tar.gz |
Fixed mb_ereg_search() segfault that occurs when the function is called
before a string to be searched is passed by mb_ereg_search_init()
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 ecf8183e34..5997d98acc 100644 --- a/ext/mbstring/php_mbregex.c +++ b/ext/mbstring/php_mbregex.c @@ -855,7 +855,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)); } |