diff options
author | Anatol Belski <ab@php.net> | 2014-12-14 19:44:24 +0100 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2014-12-14 19:44:24 +0100 |
commit | a857f3a147a4856807101a66cdfd58befa2cb489 (patch) | |
tree | 3138c4c6c7705d57526b926eae9ed23e012c80a3 /Zend/zend_operators.c | |
parent | 0a40e6a3dbb311ed25058bb9dae209b998ecaeed (diff) | |
parent | 855d2966385755435b65d77e1c0dfda17555eab9 (diff) | |
download | php-git-a857f3a147a4856807101a66cdfd58befa2cb489.tar.gz |
Merge remote-tracking branch 'origin/master' into native-tls
* origin/master:
Fix bug #67106 split main fpm config
split fpm config to two parts. PR#903
fix typo
Fix undefined behaviour in strnatcmp
Fix undefined behaviour in strnatcmp
Fixed memory leak introduced by 73458e8f
update NEWS
move the test to the right place
Fixed bug #68545 NULL pointer dereference in unserialize.c
Diffstat (limited to 'Zend/zend_operators.c')
-rw-r--r-- | Zend/zend_operators.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c index 24f1100650..70de104975 100644 --- a/Zend/zend_operators.c +++ b/Zend/zend_operators.c @@ -1153,6 +1153,9 @@ ZEND_API int mod_function(zval *result, zval *op1, zval *op2) /* {{{ */ return SUCCESS; } + if (op1 == result) { + zval_dtor(result); + } ZVAL_LONG(result, op1_lval % op2_lval); return SUCCESS; } @@ -1315,6 +1318,9 @@ ZEND_API int bitwise_or_function(zval *result, zval *op1, zval *op2) /* {{{ */ op2_lval = Z_LVAL_P(op2); } + if (op1 == result) { + zval_dtor(result); + } ZVAL_LONG(result, op1_lval | op2_lval); return SUCCESS; } @@ -1370,6 +1376,9 @@ ZEND_API int bitwise_and_function(zval *result, zval *op1, zval *op2) /* {{{ */ op2_lval = Z_LVAL_P(op2); } + if (op1 == result) { + zval_dtor(result); + } ZVAL_LONG(result, op1_lval & op2_lval); return SUCCESS; } @@ -1425,6 +1434,9 @@ ZEND_API int bitwise_xor_function(zval *result, zval *op1, zval *op2) /* {{{ */ op2_lval = Z_LVAL_P(op2); } + if (op1 == result) { + zval_dtor(result); + } ZVAL_LONG(result, op1_lval ^ op2_lval); return SUCCESS; } @@ -1477,6 +1489,9 @@ ZEND_API int shift_left_function(zval *result, zval *op1, zval *op2) /* {{{ */ } } + if (op1 == result) { + zval_dtor(result); + } ZVAL_LONG(result, op1_lval << op2_lval); return SUCCESS; } @@ -1529,6 +1544,9 @@ ZEND_API int shift_right_function(zval *result, zval *op1, zval *op2) /* {{{ */ } } + if (op1 == result) { + zval_dtor(result); + } ZVAL_LONG(result, op1_lval >> op2_lval); return SUCCESS; } |