bug70898.phpt 1.0 KB

12345678910111213141516171819202122
  1. --TEST--
  2. Bug #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. echo implode(m("",m("",m("",m("",m("0000000000000000000000000000000000",("")))))));
  9. ?>
  10. --EXPECTF--
  11. 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
  12. Warning: array_map() expects parameter 1 to be a valid callback, function '' not found or invalid function name in %sbug70898.php on line %d
  13. Warning: array_map() expects parameter 1 to be a valid callback, function '' not found or invalid function name in %sbug70898.php on line %d
  14. Warning: array_map() expects parameter 1 to be a valid callback, function '' not found or invalid function name in %sbug70898.php on line %d
  15. Warning: array_map() expects parameter 1 to be a valid callback, function '' not found or invalid function name in %sbug70898.php on line %d
  16. Warning: implode(): Argument must be an array in %sbug70898.php on line %d