From: Felipe Pena Date: Fri, 4 Apr 2008 17:39:52 +0000 (+0000) Subject: Fixed bug #44591 (imagegif's filename parameter) X-Git-Tag: php-5.2.6RC5~18 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e8795126ead944a345c47d6ec16b6e5b8f11d3e1;p=php Fixed bug #44591 (imagegif's filename parameter) --- diff --git a/NEWS b/NEWS index 04a26c528d..0c16d62587 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,7 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? Apr 2008, PHP 5.2.6 +- Fixed bug #44591 (imagegif's filename parameter). (Felipe) 03 Apr 2008, PHP 5.2.6RC4 - Fixed possible stack buffer overflow in FastCGI SAPI. (Andrei Nigmatulin) diff --git a/ext/gd/gd.c b/ext/gd/gd.c index 476231d730..c803eecc74 100644 --- a/ext/gd/gd.c +++ b/ext/gd/gd.c @@ -2813,7 +2813,7 @@ static void _php_image_output(INTERNAL_FUNCTION_PARAMETERS, int image_type, char } } - if ((argc == 2) || (argc > 2 && Z_STRLEN_PP(file))) { + if (argc >= 2 && Z_STRLEN_PP(file)) { PHP_GD_CHECK_OPEN_BASEDIR(fn, "Invalid filename"); fp = VCWD_FOPEN(fn, "wb");