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

From: Date: Sat, 26 Nov 2016 02:57:18 +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-96049@lists.php.net to get a copy of this message
Commit: fe994fd9a471fbaa3fef39567942e8de6ae1aba7 Author: Stanislav Malyshev <stas@php.net> Fri, 25 Nov 2016 13:42:35 -0800 Parents: b8645ef29ea1c6c81d01b4950447f70f1a0228e6 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=fe994fd9a471fbaa3fef39567942e8de6ae1aba7 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 f3e98a6..28ec8a3 100644 --- a/ext/phar/phar_object.c +++ b/ext/phar/phar_object.c @@ -1062,6 +1062,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 (#96049) next »