Skip to content

Commit

Permalink
Fixed bug #44591 (imagegif's filename parameter)
Browse files Browse the repository at this point in the history
  • Loading branch information
felipensp committed Apr 4, 2008
1 parent d80a511 commit e879512
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions 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)
Expand Down
2 changes: 1 addition & 1 deletion ext/gd/gd.c
Expand Up @@ -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");
Expand Down

0 comments on commit e879512

Please sign in to comment.