add test for bug #70898

This commit is contained in:
Anatol Belski 2015-11-12 09:28:10 +01:00
parent c2de445f79
commit 9c4fd36783

22
Zend/tests/bug70898.phpt Normal file
View File

@ -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