summaryrefslogtreecommitdiff
path: root/Zend/zend_operators.c
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2020-10-12 11:22:39 +0200
committerNikita Popov <nikita.ppv@gmail.com>2020-10-12 11:24:31 +0200
commit3c4dd73c023e4aea317f774e045fdccc644f24b5 (patch)
tree844a56d8505a9eb17075a8065dce710d2dc8fb50 /Zend/zend_operators.c
parente304468e57692d4dfcf283346dd67c3e418e1934 (diff)
downloadphp-git-3c4dd73c023e4aea317f774e045fdccc644f24b5.tar.gz
Detect self-addition of array more accurately
While the zvals may be different, they may still point to the same array. Fixes oss-fuzz #26245.
Diffstat (limited to 'Zend/zend_operators.c')
-rw-r--r--Zend/zend_operators.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c
index 45cdc1b11c..7338e471b6 100644
--- a/Zend/zend_operators.c
+++ b/Zend/zend_operators.c
@@ -903,7 +903,7 @@ try_again:
static zend_never_inline void ZEND_FASTCALL add_function_array(zval *result, zval *op1, zval *op2) /* {{{ */
{
- if ((result == op1) && (result == op2)) {
+ if (result == op1 && Z_ARR_P(op1) == Z_ARR_P(op2)) {
/* $a += $a */
return;
}