mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
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()
This commit is contained in:
parent
bd55130077
commit
9a723fcb4e
1 changed files with 1 additions and 1 deletions
|
@ -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));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue