xref: /PHP-7.2/Zend/tests/bug70898.phpt (revision 17ccbeec)
1--TEST--
2Bug #70895 null ptr deref and segfault with crafted callable
3--FILE--
4<?php
5	function m($f,$a){
6		return array_map($f,0);
7	}
8
9	echo implode(m("",m("",m("",m("",m("0000000000000000000000000000000000",("")))))));
10?>
11--EXPECTF--
12Warning: array_map() expects parameter 1 to be a valid callback, function '0000000000000000000000000000000000' not found or invalid function name in %sbug70898.php on line %d
13
14Warning: array_map() expects parameter 1 to be a valid callback, function '' not found or invalid function name in %sbug70898.php on line %d
15
16Warning: array_map() expects parameter 1 to be a valid callback, function '' not found or invalid function name in %sbug70898.php on line %d
17
18Warning: array_map() expects parameter 1 to be a valid callback, function '' not found or invalid function name in %sbug70898.php on line %d
19
20Warning: array_map() expects parameter 1 to be a valid callback, function '' not found or invalid function name in %sbug70898.php on line %d
21
22Warning: implode(): Argument must be an array in %sbug70898.php on line %d
23