Skip to content

Yet more test suite fixes with external gd #11280

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 7 commits into from
Closed
8 changes: 5 additions & 3 deletions ext/gd/tests/bug39780_extern.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ $im = imagecreatefrompng(__DIR__ . '/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(): v%sbug39780.png" is not a valid PNG file in /%s on line %d
Warning: imagecreatefrompng(): gd-png: fatal libpng error: Read Error: truncated data%win %s on line %d

Warning: imagecreatefrompng(): gd-png error: setjmp returns error condition %d%win %s on line %d

Warning: imagecreatefrompng(): "%sbug39780.png" is not a valid PNG file in %s on line %d
bool(false)
4 changes: 2 additions & 2 deletions ext/gd/tests/bug66356.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ Array
[height] => 10
)

Warning: imagecrop(): One parameter to a memory allocation multiplication is negative or zero, failing operation gracefully
Warning: imagecrop(): %cne parameter to a memory allocation multiplication is negative or zero, failing operation gracefully
in %s on line %d
bool(false)
object(GdImage)#2 (0) {
}
object(GdImage)#2 (0) {
}

Warning: imagecrop(): Product of memory allocation multiplication would exceed INT_MAX, failing operation gracefully
Warning: imagecrop(): %croduct of memory allocation multiplication would exceed INT_MAX, failing operation gracefully
in %s on line %d
bool(false)
2 changes: 1 addition & 1 deletion ext/gd/tests/bug77272.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ $img = imagecreate(2**28, 1);
var_dump(imagescale($img, 1, 1, IMG_TRIANGLE));
?>
--EXPECTF--
Warning: imagescale():%S Product of memory allocation multiplication would exceed INT_MAX, failing operation gracefully
Warning: imagescale():%S %croduct of memory allocation multiplication would exceed INT_MAX, failing operation gracefully
in %s on line %d
bool(false)
4 changes: 2 additions & 2 deletions ext/gd/tests/bug77479.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ imagecolorallocate($im, 0, 0, 0);
imagewbmp($im, __DIR__ . '/77479.wbmp');
?>
--EXPECTF--
Warning: imagewbmp():%S Product of memory allocation multiplication would exceed INT_MAX, failing operation gracefully
Warning: imagewbmp():%S %croduct of memory allocation multiplication would exceed INT_MAX, failing operation gracefully
in %s on line %d

Warning: imagewbmp(): Could not create WBMP in %s on line %d
Warning: imagewbmp(): Could not create WBMP%win %s on line %d
--CLEAN--
<?php
@unlink(__DIR__ . '/77479.wbmp');
Expand Down
2 changes: 1 addition & 1 deletion ext/gd/tests/createfromwbmp2_extern.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@ $im = imagecreatefromwbmp($filename);
unlink($filename);
?>
--EXPECTF--
gd warning: Product of memory allocation multiplication would exceed INT_MAX, failing operation gracefully
Warning: imagecreatefromwbmp(): %croduct of memory allocation multiplication would exceed INT_MAX, failing operation gracefully%win %s on line %d

Warning: imagecreatefromwbmp(): "%s_tmp.wbmp" is not a valid WBMP file in %s on line %d
6 changes: 6 additions & 0 deletions ext/gd/tests/imagegd_truecolor.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
imagegd() writes truecolor images without palette conversion
--EXTENSIONS--
gd
--SKIPIF--
<?php
if (!GD_BUNDLED && version_compare(GD_VERSION, '2.3.3', '>=')) {
die("skip test requires GD 2.3.2 or older");
}
?>
--FILE--
<?php
require_once __DIR__ . DIRECTORY_SEPARATOR . 'func.inc';
Expand Down
5 changes: 3 additions & 2 deletions ext/gd/tests/libgd00086_extern.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ $im = imagecreatefrompng(__DIR__ . '/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(): gd-png: fatal libpng error: Read Error: truncated data%win %s on line %d

Warning: imagecreatefrompng(): gd-png error: setjmp returns error condition %d%win %s on line %d

Warning: imagecreatefrompng(): "%slibgd00086.png" is not a valid PNG file in %s on line %d
bool(false)