com php-src: add test for bug #70898: Zend/tests/bug70898.phpt
| From: | Anatol Belski | Date: | Thu, 12 Nov 2015 08:28:10 +0000 |
| Subject: | com php-src: add test for bug #70898: Zend/tests/bug70898.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-89770@lists.php.net to get a copy of this message | ||
Commit: 9c4fd367835fac9dc4981bb1e8e8f6e7a612ecae
Author: Anatol Belski <ab@php.net> Thu, 12 Nov 2015 09:28:10 +0100
Parents: c2de445f79eb0be77d8b9eb349aab2a8e306d45c
Branches: PHP-7.0 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=9c4fd367835fac9dc4981bb1e8e8f6e7a612ecae
Log:
add test for bug #70898
Bugs:
https://bugs.php.net/70898
Changed paths:
A Zend/tests/bug70898.phpt
Diff:
diff --git a/Zend/tests/bug70898.phpt b/Zend/tests/bug70898.phpt
new file mode 100644
index 0000000..6308ddc
--- /dev/null
+++ b/Zend/tests/bug70898.phpt
@@ -0,0 +1,22 @@
+--TEST--
+Bug #70895 null ptr deref and segfault with crafted calable
+--FILE--
+<?php
+ function m($f,$a){
+ return array_map($f,0);
+ }
+
+ echo
implode(m("",m("",m("",m("",m("0000000000000000000000000000000000",("")))))));
+?>
+--EXPECTF--
+Warning: array_map() expects parameter 1 to be a valid callback, function
'0000000000000000000000000000000000' not found or invalid function name in %sbug70898.php
on line %d
+
+Warning: array_map() expects parameter 1 to be a valid callback, function '' not found or
invalid function name in %sbug70898.php on line %d
+
+Warning: array_map() expects parameter 1 to be a valid callback, function '' not found or
invalid function name in %sbug70898.php on line %d
+
+Warning: array_map() expects parameter 1 to be a valid callback, function '' not found or
invalid function name in %sbug70898.php on line %d
+
+Warning: array_map() expects parameter 1 to be a valid callback, function '' not found or
invalid function name in %sbug70898.php on line %d
+
+Warning: implode(): Argument must be an array in %sbug70898.php on line %d