Skip to content

Commit

Permalink
fix directorySize check for zip64
Browse files Browse the repository at this point in the history
  • Loading branch information
goloveychuk authored Feb 16, 2025
1 parent 586e205 commit 990198b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/archive/zip/reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,7 @@ func readDirectoryEnd(r io.ReaderAt, size int64) (dir *directoryEnd, baseOffset
d.comment = string(b[:l])

// These values mean that the file can be a zip64 file
if d.directoryRecords == 0xffff || d.directorySize == 0xffff || d.directoryOffset == 0xffffffff {
if d.directoryRecords == 0xffff || d.directorySize == 0xffffffff || d.directoryOffset == 0xffffffff {
p, err := findDirectory64End(r, directoryEndOffset)
if err == nil && p >= 0 {
directoryEndOffset = p
Expand Down

0 comments on commit 990198b

Please sign in to comment.