]> git.ipfire.org Git - thirdparty/libarchive.git/commit
Fix excessive disk read for padded zip.
authorRussell Mullens <the_pimaster@hotmail.com>
Tue, 23 Mar 2021 11:22:07 +0000 (22:22 +1100)
committerRussell Mullens <the_pimaster@hotmail.com>
Tue, 23 Mar 2021 11:22:07 +0000 (22:22 +1100)
commit03dd1e54c08715364141e0aa091151ea8ee4f5a4
tree5447ec5dbbd58c7aae09e7ed8c042da6acc32f59
parentf5da47515fdd42153cb0c2da1b2b93fb87f67915
Fix excessive disk read for padded zip.

Use the size of the Central Directory and the offset of the EOCD to
calculate the real position.

This trick doesn't work for Zip64 as easily as we are not scanning
backwards to find the PK\x06\x06 entry.
Interestingly, it is never checked so it could be trying to parse
bad files.

Updated based on review
libarchive/archive_read_support_format_zip.c