mirror of
https://github.com/tsolomko/SWCompression.git
synced 2026-06-23 14:56:41 +00:00
Fix potentially getting incorrect offset to CD entry
This commit is contained in:
@@ -64,7 +64,7 @@ public class ZipContainer: Container {
|
||||
// TODO: temporary
|
||||
private static func getEntryData(_ pointerData: DataWithPointer, _ info: ZipEntryInfo) throws -> Data {
|
||||
// Now, let's move to the location of local header.
|
||||
pointerData.index = Int(UInt32(truncatingIfNeeded: info.cdEntry.offset))
|
||||
pointerData.index = Int(info.cdEntry.offset)
|
||||
|
||||
let localHeader = try ZipLocalHeader(pointerData)
|
||||
// Check local header for consistency with Central Directory entry.
|
||||
|
||||
Reference in New Issue
Block a user