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 21:42:35 +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-96048@lists.php.net to get a copy of this message
Commit: cb6bcaa61f99d62467478041b461413cc6b43563 Author: Stanislav Malyshev <stas@php.net> Fri, 25 Nov 2016 13:42:35 -0800 Parents: a36dd1dfd8cf807d31aa9acc2f092b532a45bb15 Branches: PHP-7.1 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=cb6bcaa61f99d62467478041b461413cc6b43563 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 (#96048) next »