Browse Source
- enable tests even when an external GD is used. Latest releases
- enable tests even when an external GD is used. Latest releases
(2.0.34 or 2.0.35) work.experimental/5.2-WITH_DRCP
35 changed files with 180 additions and 144 deletions
-
5ext/gd/tests/bug19366.phpt
-
9ext/gd/tests/bug22544.phpt
-
10ext/gd/tests/bug24155.phpt
-
5ext/gd/tests/bug24594.phpt
-
1ext/gd/tests/bug27582_1.phpt
-
12ext/gd/tests/bug28147.phpt
-
7ext/gd/tests/bug36697.phpt
-
5ext/gd/tests/bug37346.phpt
-
5ext/gd/tests/bug37360.phpt
-
7ext/gd/tests/bug38112.phpt
-
7ext/gd/tests/bug39082.phpt
-
5ext/gd/tests/bug39273.phpt
-
5ext/gd/tests/bug39286.phpt
-
6ext/gd/tests/bug39366.phpt
-
5ext/gd/tests/bug39508.phpt
-
8ext/gd/tests/bug39780.phpt
-
18ext/gd/tests/bug39780_extern.phpt
-
1ext/gd/tests/createfromgd2.phpt
-
1ext/gd/tests/createfromwbmp.phpt
-
3ext/gd/tests/createfromwbmp2.phpt
-
47ext/gd/tests/createfromwbmp2_extern.phpt
-
10ext/gd/tests/gif2gd.phpt
-
8ext/gd/tests/gif2jpg.phpt
-
8ext/gd/tests/gif2png.phpt
-
24ext/gd/tests/imagefilter.phpt
-
1ext/gd/tests/imagewbmp.phpt
-
14ext/gd/tests/jpeg2png.phpt
-
14ext/gd/tests/jpg2gd.phpt
-
6ext/gd/tests/libgd00086.phpt
-
19ext/gd/tests/libgd00086_extern.phpt
-
14ext/gd/tests/png2gd.phpt
-
8ext/gd/tests/pngcomp.phpt
-
10ext/gd/tests/xpm2gd.phpt
-
8ext/gd/tests/xpm2jpg.phpt
-
8ext/gd/tests/xpm2png.phpt
@ -0,0 +1,18 @@ |
|||
--TEST-- |
|||
Bug #39780 (PNG image with CRC/data error raises a fatal error) |
|||
--SKIPIF-- |
|||
<?php |
|||
if (!extension_loaded('gd')) die("skip gd extension not available\n"); |
|||
if (GD_BUNDLED) die("skip requires extern GD\n"); |
|||
?> |
|||
--FILE-- |
|||
<?php |
|||
|
|||
$im = imagecreatefrompng(dirname(__FILE__) . '/bug39780.png'); |
|||
var_dump($im); |
|||
?> |
|||
--EXPECTF-- |
|||
gd-png: fatal libpng error: Read Error: truncated data |
|||
gd-png error: setjmp returns error condition 2 |
|||
Warning: imagecreatefrompng(): '%sbug39780.png' is not a valid PNG file in /%s on line %d |
|||
bool(false) |
|||
@ -0,0 +1,47 @@ |
|||
--TEST-- |
|||
imagecreatefromwbmp with invalid wbmp |
|||
--SKIPIF-- |
|||
<?php |
|||
if (!function_exists('imagecreatefromwbmp')) die("skip gd extension not available\n"); |
|||
if (GD_BUNDLED) die("skip requires extern GD\n"); |
|||
?> |
|||
--FILE-- |
|||
<?php |
|||
$filename = dirname(__FILE__) . '/_tmp.wbmp'; |
|||
$fp = fopen($filename,"wb"); |
|||
if (!$fp) { |
|||
exit("Failed to create <$filename>"); |
|||
} |
|||
|
|||
//write header |
|||
$c = 0; |
|||
fputs($fp, chr($c), 1); |
|||
fputs($fp, $c, 1); |
|||
|
|||
//write width = 2^32 / 4 + 1 |
|||
$c = 0x84; |
|||
fputs($fp, chr($c), 1); |
|||
$c = 0x80; |
|||
fputs($fp, chr($c), 1); |
|||
fputs($fp, chr($c), 1); |
|||
fputs($fp, chr($c), 1); |
|||
$c = 0x01; |
|||
fputs($fp, chr($c), 1); |
|||
|
|||
/*write height = 4*/ |
|||
$c = 0x04; |
|||
fputs($fp, chr($c), 1); |
|||
|
|||
/*write some data to cause overflow*/ |
|||
for ($i=0; $i<10000; $i++) { |
|||
fwrite($fp, chr($c), 1); |
|||
} |
|||
|
|||
fclose($fp); |
|||
$im = imagecreatefromwbmp($filename); |
|||
unlink($filename); |
|||
?> |
|||
--EXPECTF-- |
|||
gd warning: product of memory allocation multiplication would exceed INT_MAX, failing operation gracefully |
|||
|
|||
Warning: imagecreatefromwbmp(): '%s_tmp.wbmp' is not a valid WBMP file in %s on line %d |
|||
@ -0,0 +1,19 @@ |
|||
--TEST-- |
|||
libgd #86 (Possible infinite loop in imagecreatefrompng) |
|||
--SKIPIF-- |
|||
<?php |
|||
if (!extension_loaded('gd')) die("skip gd extension not available\n"); |
|||
if (GD_BUNDLED) die("skip requires external GD library\n"); |
|||
?> |
|||
--FILE-- |
|||
<?php |
|||
|
|||
$im = imagecreatefrompng(dirname(__FILE__) . '/libgd00086.png'); |
|||
var_dump($im); |
|||
?> |
|||
--EXPECTF-- |
|||
gd-png: fatal libpng error: Read Error: truncated data |
|||
gd-png error: setjmp returns error condition 1 |
|||
|
|||
Warning: imagecreatefrompng(): '%slibgd00086.png' is not a valid PNG file in %s on line %d |
|||
bool(false) |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue