com php-src: Fix int/size_t confusion in isValidPharFil ename (bug #73580): ext/phar/phar_obj ect.c

From: Date: Fri, 25 Nov 2016 23:31:50 +0000
Subject: com php-src: Fix int/size_t confusion in isValidPharFil ename (bug #73580): ext/phar/phar_obj ect.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-96042@lists.php.net to get a copy of this message
Commit: bcc913fa8be6672e02f850f95857621a30c9d8ff Author: Stanislav Malyshev <stas@php.net> Fri, 25 Nov 2016 13:42:35 -0800 Parents: bc979aee6d912bd4c15dfa4e68df4f5011ae4b87 Branches: PHP-7.0 PHP-7.1 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=bcc913fa8be6672e02f850f95857621a30c9d8ff Log: Fix int/size_t confusion in isValidPharFilename (bug #73580) Bugs: https://bugs.php.net/73580 Changed paths: M ext/phar/phar_object.c Diff: diff --git a/ext/phar/phar_object.c b/ext/phar/phar_object.c index c57bdef..6998a4d 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); }

« previous php.cvs (#96042) next »