From bcc913fa8be6672e02f850f95857621a30c9d8ff Mon Sep 17 00:00:00 2001 From: Stanislav Malyshev Date: Fri, 25 Nov 2016 13:42:35 -0800 Subject: [PATCH] Fix int/size_t confusion in isValidPharFilename (bug #73580) --- ext/phar/phar_object.c | 4 ++++ 1 file changed, 4 insertions(+) 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); } -- 2.40.0