diff options
author | Dmitry Stogov <dmitry@zend.com> | 2015-06-01 11:40:14 +0300 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2015-06-01 11:40:14 +0300 |
commit | 9031a902e3393ff7dc8a02615430a7d894c740fa (patch) | |
tree | be0e28272b952522fb2a34d12053c6888a84d633 /Zend/tests | |
parent | 8746163153157857fcb95b8ab33b77144d7ee7a8 (diff) | |
download | php-git-9031a902e3393ff7dc8a02615430a7d894c740fa.tar.gz |
Fixed bug #69732 (can induce segmentation fault with basic php code).
Diffstat (limited to 'Zend/tests')
-rw-r--r-- | Zend/tests/bug69732.phpt | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/Zend/tests/bug69732.phpt b/Zend/tests/bug69732.phpt new file mode 100644 index 0000000000..2ea5e58bc9 --- /dev/null +++ b/Zend/tests/bug69732.phpt @@ -0,0 +1,30 @@ +--TEST-- +Bug #69732 (can induce segmentation fault with basic php code) +--FILE-- +<?php +class wpq { + private $unreferenced; + + public function __get($name) { + return $this->$name . "XXX"; + } +} + +function ret_assoc() { + $x = "XXX"; + return array('foo' => 'bar', $x); +} + +$wpq = new wpq; +$wpq->interesting =& ret_assoc(); +$x = $wpq->interesting; +printf("%s\n", $x); +--EXPECTF-- +Notice: Undefined property: wpq::$interesting in %sbug69732.php on line 6 + +Notice: Indirect modification of overloaded property wpq::$interesting has no effect in %sbug69732.php on line 16 + +Strict Standards: Only variables should be assigned by reference in %sbug69732.php on line 16 + +Notice: Undefined property: wpq::$interesting in %sbug69732.php on line 6 +XXX |