summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/phar/phar_object.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/phar/phar_object.c b/ext/phar/phar_object.c
index c57bdef3c6..6998a4db91 100644
--- a/ext/phar/phar_object.c
+++ b/ext/phar/phar_object.c
@@ -1066,6 +1066,10 @@ PHP_METHOD(Phar, isValidPharFilename)
return;
}
+ if (ZEND_SIZE_T_INT_OVFL(fname_len)) {
+ RETURN_FALSE;
+ }
+
is_executable = executable;
RETVAL_BOOL(phar_detect_phar_fname_ext(fname, fname_len, &ext_str, &ext_len, is_executable, 2, 1) == SUCCESS);
}