summaryrefslogtreecommitdiff
path: root/ext/mbstring/php_mbregex.c
diff options
context:
space:
mode:
authorXinchen Hui <laruence@gmail.com>2016-11-16 15:05:04 +0800
committerXinchen Hui <laruence@gmail.com>2016-11-16 15:05:04 +0800
commit229024c7250d0a11fe9a83094a7e30b6fb83ad90 (patch)
tree03cd09086eb480cb496118a31c12fb5ddad56e1e /ext/mbstring/php_mbregex.c
parentd6c36e9af7ce43445b823e9a3b96868cf60fa7ed (diff)
downloadphp-git-229024c7250d0a11fe9a83094a7e30b6fb83ad90.tar.gz
Fixed bug #73532 (Null pointer dereference in mb_eregi)
Diffstat (limited to 'ext/mbstring/php_mbregex.c')
-rw-r--r--ext/mbstring/php_mbregex.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/ext/mbstring/php_mbregex.c b/ext/mbstring/php_mbregex.c
index a9e464fa64..cf341d3599 100644
--- a/ext/mbstring/php_mbregex.c
+++ b/ext/mbstring/php_mbregex.c
@@ -708,8 +708,10 @@ static void _php_mb_regex_ereg_exec(INTERNAL_FUNCTION_PARAMETERS, int icase)
string_len,
_php_mb_regex_mbctype2name(MBREX(current_mbctype))
)) {
- zval_dtor(array);
- array_init(array);
+ if (array != NULL) {
+ zval_dtor(array);
+ array_init(array);
+ }
RETURN_FALSE;
}