2006-12-10 09:28:01 +08:00
|
|
|
--TEST--
|
|
|
|
Bug #39780 (PNG image with CRC/data error raises a fatal error)
|
2021-05-17 04:51:09 +08:00
|
|
|
--EXTENSIONS--
|
|
|
|
gd
|
2006-12-10 09:28:01 +08:00
|
|
|
--SKIPIF--
|
2007-05-29 01:57:20 +08:00
|
|
|
<?php
|
2020-09-18 20:28:32 +08:00
|
|
|
if (!GD_BUNDLED) die("skip requires bundled GD library\n");
|
2006-12-10 09:28:01 +08:00
|
|
|
?>
|
|
|
|
--FILE--
|
|
|
|
<?php
|
|
|
|
|
2019-03-16 05:55:30 +08:00
|
|
|
$im = imagecreatefrompng(__DIR__ . '/bug39780.png');
|
2006-12-10 09:28:01 +08:00
|
|
|
var_dump($im);
|
|
|
|
?>
|
|
|
|
--EXPECTF--
|
2007-05-22 17:45:12 +08:00
|
|
|
Warning: imagecreatefrompng(): gd-png: fatal libpng error: Read Error: truncated data in %s on line %d
|
2006-12-10 09:28:01 +08:00
|
|
|
|
|
|
|
Warning: imagecreatefrompng(): gd-png error: setjmp returns error condition in %s on line %d
|
|
|
|
|
2020-08-20 05:27:53 +08:00
|
|
|
Warning: imagecreatefrompng(): "%s" is not a valid PNG file in %s on line %d
|
2006-12-10 09:28:01 +08:00
|
|
|
bool(false)
|