This commit is contained in:
Chris Hennick 2023-05-12 09:07:42 -07:00
parent dd83186928
commit 9b65b8a523
No known key found for this signature in database
GPG key ID: 25653935CC8B6C74

View file

@ -397,9 +397,6 @@ impl<R: Read + Seek> ZipArchive<R> {
}
};
// It has both, so check if the zip64 footer is valid; if not, assume zip32
if directory_start_64 - archive_offset_64 != directory_start_32 - archive_offset_32 {
return Ok((archive_offset_32, directory_start_32, number_of_files_32));
}
if number_of_files_64 != number_of_files_32 && number_of_files_32 != u16::MAX as usize {
return Ok((archive_offset_32, directory_start_32, number_of_files_32));
}