php-src/ext/phar
Christoph M. Becker d1b1c04398 Fix #77565: Incorrect locator detection in ZIP-based phars
We must not assume that the first end of central dir signature in a ZIP
archive actually designates the end of central directory record, since
the data in the archive may contain arbitrary byte patterns.  Thus, we
better search from the end of the data, what is also slightly more
efficient.

There is, however, no way to detect the end of central directory
signature by searching from the end of the ZIP archive with absolute
certainty, since the signature could be part of the trailing comment.
To mitigate, we check that the comment length fits to the found
position, but that might still not be the correct position in rare
cases.

Closes GH-6507.
2021-01-05 23:40:24 +01:00
..
phar Apply tidy formatting 2020-02-03 13:41:31 +01:00
tests Fix #77565: Incorrect locator detection in ZIP-based phars 2021-01-05 23:40:24 +01:00
build_precommand.php Apply tidy formatting 2020-02-03 13:41:31 +01:00
config.m4 Sync HAVE_HASH, HAVE_HASH_EXT, PHAR_HASH_OK symbols 2019-06-27 23:25:33 +02:00
config.w32 Sync HAVE_HASH, HAVE_HASH_EXT, PHAR_HASH_OK symbols 2019-06-27 23:25:33 +02:00
CREDITS
dirstream.c Report errors from stream read and write operations 2019-07-22 17:17:28 +02:00
dirstream.h Report errors from stream read and write operations 2019-07-22 17:17:28 +02:00
func_interceptors.c Update and fix remaining year ranges (2019) 2019-02-08 23:14:29 +01:00
func_interceptors.h Update and fix remaining year ranges (2019) 2019-02-08 23:14:29 +01:00
gdbhelp Sync leading and final newlines in source code files 2018-10-14 12:56:38 +02:00
Makefile.frag Respect --program-prefix/suffix when installing phar 2020-06-05 10:10:40 +02:00
Makefile.frag.w32 Sync leading and final newlines in source code files 2018-10-14 12:56:38 +02:00
makestub.php Apply tidy formatting 2020-02-03 13:41:31 +01:00
phar_internal.h Remove unused tsrm_strtok_r() function 2019-07-12 13:14:24 +02:00
phar_object.c Fix memory leak in Phar::webPhar() on Windows 2021-01-05 14:21:35 +01:00
phar_path_check.re Update and fix remaining year ranges (2019) 2019-02-08 23:14:29 +01:00
phar.1.in Update and fix remaining year ranges (2019) 2019-02-08 23:14:29 +01:00
phar.c Call zend_unregister_ini_entries() when unload extension loaded through dl() without MSHUTDOWN callback. 2019-12-09 15:05:24 +03:00
phar.phar.1.in
pharzip.h Update and fix remaining year ranges (2019) 2019-02-08 23:14:29 +01:00
php_phar.h Update and fix remaining year ranges (2019) 2019-02-08 23:14:29 +01:00
shortarc.php Fix undefined variable, and remove unused test-pdo 2019-05-03 18:14:32 +02:00
stream.c Report errors from stream read and write operations 2019-07-22 17:17:28 +02:00
stream.h Report errors from stream read and write operations 2019-07-22 17:17:28 +02:00
stub.h Update and fix remaining year ranges (2019) 2019-02-08 23:14:29 +01:00
tar.c Fix #75102: PharData says invalid checksum for valid tar 2020-12-04 13:02:29 +01:00
tar.h Update and fix remaining year ranges (2019) 2019-02-08 23:14:29 +01:00
util.c Fix #77322: PharData::addEmptyDir('/') Possible integer overflow 2020-12-15 11:44:53 +01:00
zip.c Fix #77565: Incorrect locator detection in ZIP-based phars 2021-01-05 23:40:24 +01:00