summaryrefslogtreecommitdiff
path: root/Zend/tests
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/tests
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/tests')
-rw-r--r--Zend/tests/array_self_add_globals.phpt10
1 files changed, 10 insertions, 0 deletions
diff --git a/Zend/tests/array_self_add_globals.phpt b/Zend/tests/array_self_add_globals.phpt
new file mode 100644
index 0000000000..ebad7c3fdf
--- /dev/null
+++ b/Zend/tests/array_self_add_globals.phpt
@@ -0,0 +1,10 @@
+--TEST--
+Add $GLOBALS to itself
+--FILE--
+<?php
+$GLOBALS += $GLOBALS;
+$x = $GLOBALS + $GLOBALS;
+?>
+===DONE===
+--EXPECT--
+===DONE===