com php-src: add test for bug #70898: Zend/tests/bug70898.phpt
| From: | Anatol Belski | Date: | Tue, 17 Nov 2015 12:09:39 +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-89924@lists.php.net to get a copy of this message | ||
Commit: 3c43ef2b16bf444273d03c87c8d6f1c84a1e0471
Author: Anatol Belski <ab@php.net> Thu, 12 Nov 2015 09:28:10 +0100
Parents: ed291d40d9dafc1d68a411810860597b263ee90d
Branches: PHP-7.0.0
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=3c43ef2b16bf444273d03c87c8d6f1c84a1e0471
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