diff options
Diffstat (limited to 'ext/standard/image.c')
-rw-r--r-- | ext/standard/image.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ext/standard/image.c b/ext/standard/image.c index c634727ea3..4e63411904 100644 --- a/ext/standard/image.c +++ b/ext/standard/image.c @@ -1478,6 +1478,11 @@ static void php_getimagesize_from_any(INTERNAL_FUNCTION_PARAMETERS, int mode) { Z_PARAM_ZVAL_DEREF(info) ZEND_PARSE_PARAMETERS_END(); + if (mode == FROM_PATH && CHECK_NULL_PATH(input, input_len)) { + php_error_docref(NULL, E_WARNING, "Invalid path"); + return; + } + if (argc == 2) { zval_ptr_dtor(info); array_init(info); |