diff options
| author | foobar <sniper@php.net> | 2003-03-12 04:15:28 +0000 |
|---|---|---|
| committer | foobar <sniper@php.net> | 2003-03-12 04:15:28 +0000 |
| commit | 2fee56b2a22940fa0762d9ae3f64b5a5314402ba (patch) | |
| tree | 5f16bf0a18dba8cb5ffe5c421f30f5870432aa6a | |
| parent | 5e26cd4293f8435f21a2bdfec54385f55b4afdf6 (diff) | |
| download | php-git-2fee56b2a22940fa0762d9ae3f64b5a5314402ba.tar.gz | |
Fix bug #22646
| -rw-r--r-- | ext/gd/gd.c | 2 | ||||
| -rw-r--r-- | ext/gd/gd_ctx.c | 2 |
2 files changed, 2 insertions, 2 deletions
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; |
