]> granicus.if.org Git - php/commitdiff
Fixed bug #44591 (imagegif's filename parameter)
authorFelipe Pena <felipe@php.net>
Fri, 4 Apr 2008 17:39:52 +0000 (17:39 +0000)
committerFelipe Pena <felipe@php.net>
Fri, 4 Apr 2008 17:39:52 +0000 (17:39 +0000)
NEWS
ext/gd/gd.c

diff --git a/NEWS b/NEWS
index 04a26c528d59769862c7a6b69f1a6a7932852515..0c16d62587c036d505c4bba75086394bfa1797d0 100644 (file)
--- 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)
index 476231d730a8b2d1b5ff2c59874ed5c704265582..c803eecc74dbf43b24d0b281841c9b5b62968fd2 100644 (file)
@@ -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");