summaryrefslogtreecommitdiff
path: root/ext/mbstring/php_mbregex.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2014-04-09 11:56:48 +0400
committerDmitry Stogov <dmitry@zend.com>2014-04-09 11:56:48 +0400
commit48d3b95aee6096aa5a005469ab20c64e6d316fdf (patch)
tree5fa1e208a459cb3feed8112bd09dc0b92f4eeb96 /ext/mbstring/php_mbregex.c
parent98ab24f1afe30608a9701b7f7ca0a24b5e5bd123 (diff)
downloadphp-git-48d3b95aee6096aa5a005469ab20c64e6d316fdf.tar.gz
Fixed NULL pointer dereferencing
Diffstat (limited to 'ext/mbstring/php_mbregex.c')
-rw-r--r--ext/mbstring/php_mbregex.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/mbstring/php_mbregex.c b/ext/mbstring/php_mbregex.c
index e9307df5d7..9a82f10104 100644
--- a/ext/mbstring/php_mbregex.c
+++ b/ext/mbstring/php_mbregex.c
@@ -973,7 +973,9 @@ static void _php_mb_regex_ereg_replace_exec(INTERNAL_FUNCTION_PARAMETERS, OnigOp
!ZVAL_IS_UNDEF(&retval)) {
convert_to_string_ex(&retval);
smart_str_appendl(&out_buf, Z_STRVAL(retval), Z_STRLEN(retval));
- eval_buf.s->len = 0;
+ if (eval_buf.s) {
+ eval_buf.s->len = 0;
+ }
zval_ptr_dtor(&retval);
} else {
efree(description);