com php-src: add tests for bug #72512: ext/gd/tests/bug72 512_0.phpt ext/gd/tests/bug72512_1 .phpt

From: Date: Wed, 06 Jul 2016 08:40:52 +0000
Subject: com php-src: add tests for bug #72512: ext/gd/tests/bug72 512_0.phpt ext/gd/tests/bug72512_1 .phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-93105@lists.php.net to get a copy of this message
Commit: b63d41e1e5cec186c06368a1fd9fd5d56be1994d Author: Anatol Belski <ab@php.net> Wed, 6 Jul 2016 10:40:52 +0200 Parents: 7b2c22696ad44df1d26d70e15521adebd95c0399 Branches: PHP-5.5 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=b63d41e1e5cec186c06368a1fd9fd5d56be1994d Log: add tests for bug #72512 Bugs: https://bugs.php.net/72512 Changed paths: A ext/gd/tests/bug72512_0.phpt A ext/gd/tests/bug72512_1.phpt Diff: diff --git a/ext/gd/tests/bug72512_0.phpt b/ext/gd/tests/bug72512_0.phpt new file mode 100644 index 0000000..5f98662 --- /dev/null +++ b/ext/gd/tests/bug72512_0.phpt @@ -0,0 +1,18 @@ +--TEST-- +Bug #72512 gdImageTrueColorToPaletteBody allows arbitrary write/read access, var 0 +--SKIPIF-- +<?php + if (!extension_loaded('gd')) die("skip gd extension not available\n"); +?> +--FILE-- +<?php + +$img = imagecreatetruecolor(13, 1007); + +imagecolortransparent($img, -10066304); +imagetruecolortopalette($img, TRUE, 3); +imagescale($img, 1, 65535); +?> +==DONE== +--EXPECT-- +==DONE== diff --git a/ext/gd/tests/bug72512_1.phpt b/ext/gd/tests/bug72512_1.phpt new file mode 100644 index 0000000..bba01a7 --- /dev/null +++ b/ext/gd/tests/bug72512_1.phpt @@ -0,0 +1,18 @@ +--TEST-- +Bug #72512 gdImageTrueColorToPaletteBody allows arbitrary write/read access, var 1 +--SKIPIF-- +<?php + if (!extension_loaded('gd')) die("skip gd extension not available\n"); +?> +--FILE-- +<?php + +$img = imagecreatetruecolor(100, 100); +imagecolortransparent($img, -1000000); +imagetruecolortopalette($img, TRUE, 3); +imagecolortransparent($img, 9); + +?> +==DONE== +--EXPECT-- +==DONE==

« previous php.cvs (#93105) next »