From: foobar Date: Wed, 12 Mar 2003 04:15:28 +0000 (+0000) Subject: Fix bug #22646 X-Git-Tag: RELEASE_0_5~505 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2fee56b2a22940fa0762d9ae3f64b5a5314402ba;p=php Fix bug #22646 --- diff --git a/ext/gd/gd.c b/ext/gd/gd.c index 35cd383fde..d013c6df47 100644 --- a/ext/gd/gd.c +++ b/ext/gd/gd.c @@ -1639,7 +1639,7 @@ static void _php_image_output(INTERNAL_FUNCTION_PARAMETERS, int image_type, char } } - if ((argc == 2) || (argc == 3 && Z_STRLEN_PP(file))) { + if ((argc == 2) || (argc > 2 && Z_STRLEN_PP(file))) { if (!fn || fn == empty_string || php_check_open_basedir(fn TSRMLS_CC)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid filename '%s'", fn); RETURN_FALSE; diff --git a/ext/gd/gd_ctx.c b/ext/gd/gd_ctx.c index 8d94224816..89853c1e60 100644 --- a/ext/gd/gd_ctx.c +++ b/ext/gd/gd_ctx.c @@ -50,7 +50,7 @@ static void _php_image_output_ctx(INTERNAL_FUNCTION_PARAMETERS, int image_type, } } - if ((argc == 2) || (argc == 3 && Z_STRLEN_PP(file))) { + if ((argc == 2) || (argc > 2 && Z_STRLEN_PP(file))) { if (!fn || fn == empty_string || php_check_open_basedir(fn TSRMLS_CC)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid filename '%s'", fn); RETURN_FALSE;