Change #236830
Category | gzip |
Changed by | Mark Adler <git | @madler.net>
Changed at | Mon 16 Jun 2025 21:49:57 |
Repository | git://git.savannah.gnu.org/gzip.git |
Project | gzip |
Branch | master |
Revision | 886d2c6965ffc2bfc4d8700e56d82ff23620930c |
Comments
zip: correctly handle PKZIP signatures and the local header This fixes bugs in the lack of detection of spanning signatures, lack of detection of empty zip files, checking the compression method, failure to skip over the file name and extra field in the SMALL_MEM case, failure to get the CRC and uncompressed length in the SMALL_MEM case, failure to check for invalid combinations of header information, the lack of detection of a Zip64 entry, and a possible decompression of a zip entry after a gzip member. * gzip.c (get_method): New arg FIRST. All callers changed. * gzip.h (PKZIP_MAGIC): Now just the two-byte magic header. * unzip.c (SPNSIG, ONESIG, Z64SIG, ENDSIG): New macros. (RAND_HEAD_LEN, decrypt): Remove. All uses removed. (orig_crc, orig_len): New static vars. (check_zipfile, unzip): Handle PKZIP signatures and the local header.
Changed files
- gzip.c
- gzip.h
- unzip.c