com php-src: Fix string extension in negate_num_string: Zend/zend_compile.c
| From: | Nikita Popov | Date: | Wed, 21 Dec 2016 21:11:17 +0000 |
| Subject: | com php-src: Fix string extension in negate_num_string: Zend/zend_compile.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-96411@lists.php.net to get a copy of this message | ||
Commit: ed0602fe311662e303c87cd63f190c609ee55923
Author: Nikita Popov <nikic@php.net> Wed, 21 Dec 2016 22:11:17 +0100
Parents: 06699abffbee5d1466460bfa9e40e2759fb283f2
Branches: PHP-7.1 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=ed0602fe311662e303c87cd63f190c609ee55923
Log:
Fix string extension in negate_num_string
Forgot to actually assign the reallocated string...
Changed paths:
M Zend/zend_compile.c
Diff:
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c
index c8f2eef..14ed6a7 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 {