From: Christoph M. Becker Date: Wed, 12 Jun 2019 10:06:24 +0000 (+0200) Subject: Merge branch 'PHP-7.4' X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=be73ae31324f7f3294a9467c0646dba4324c78ef;p=php Merge branch 'PHP-7.4' * PHP-7.4: Simplify GD null byte injection tests --- be73ae31324f7f3294a9467c0646dba4324c78ef diff --cc ext/gd/tests/imagegd2_nullbyte_injection.phpt index 537535b4c2,2fc3050421..856acaefee --- a/ext/gd/tests/imagegd2_nullbyte_injection.phpt +++ b/ext/gd/tests/imagegd2_nullbyte_injection.phpt @@@ -7,30 -7,8 +7,9 @@@ Testing null byte injection in imagegd --FILE-- getMessage(), "\n"; - } - var_dump(file_exists($tempdir. "/test1")); - var_dump(file_exists($tempdir. "/test1.tmp")); + var_dump(imagegd2($image, "./foo\0bar")); + ?> ---EXPECTF-- +?> +--EXPECT-- - imagegd2 TEST - imagegd2() expects parameter 2 to be a valid path, string given - bool(false) - bool(false) + Warning: imagegd2() expects parameter 2 to be a valid path, string given in %s on line %d + NULL diff --cc ext/gd/tests/imagegd_nullbyte_injection.phpt index dbfff3bd93,f5479a0050..6bcc0ee2bc --- a/ext/gd/tests/imagegd_nullbyte_injection.phpt +++ b/ext/gd/tests/imagegd_nullbyte_injection.phpt @@@ -7,30 -7,8 +7,8 @@@ Testing null byte injection in imageg --FILE-- getMessage(), "\n"; - } - var_dump(file_exists($tempdir. "/test1")); - var_dump(file_exists($tempdir. "/test1.tmp")); + var_dump(imagegd($image, "./foo\0bar")); ?> ---EXPECTF-- +--EXPECT-- - imagegd TEST - imagegd() expects parameter 2 to be a valid path, string given - bool(false) - bool(false) + Warning: imagegd() expects parameter 2 to be a valid path, string given in %s on line %d + NULL