From: Nikita Popov Date: Wed, 21 Dec 2016 21:11:17 +0000 (+0100) Subject: Fix string extension in negate_num_string X-Git-Tag: php-7.1.1RC1~61 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ed0602fe311662e303c87cd63f190c609ee55923;p=php Fix string extension in negate_num_string Forgot to actually assign the reallocated string... --- diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index c8f2eefa7d..14ed6a7435 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -1842,7 +1842,7 @@ zend_ast *zend_negate_num_string(zend_ast *ast) /* {{{ */ } } else if (Z_TYPE_P(zv) == IS_STRING) { size_t orig_len = Z_STRLEN_P(zv); - zend_string_extend(Z_STR_P(zv), orig_len + 1, 0); + Z_STR_P(zv) = zend_string_extend(Z_STR_P(zv), orig_len + 1, 0); memmove(Z_STRVAL_P(zv) + 1, Z_STRVAL_P(zv), orig_len + 1); Z_STRVAL_P(zv)[0] = '-'; } else {