diff options
author | Andrew Gerrand <adg@golang.org> | 2019-05-31 22:00:42 +1000 |
---|---|---|
committer | Daniel Martà <mvdan@mvdan.cc> | 2019-08-27 17:00:43 +0000 |
commit | 483d6d99256b3c486e0c99106e232b4909938328 (patch) | |
tree | 3e22fb1140c79502466e9d3403107ecd331e81af /src/archive/zip/reader.go | |
parent | 4a4f752c3812d18ffcaa06624de1a29d4e9ab056 (diff) | |
download | go-483d6d99256b3c486e0c99106e232b4909938328.tar.gz go-483d6d99256b3c486e0c99106e232b4909938328.zip |
archive/zip: remove unused special case
This removes a special case that was added to fix issue #10956, but that
was never actually effective. The code in the test case still fails to
read, so perhaps the zip64 support added in CL 6463050 inadvertently
caught this particular case.
It's possible that the original theorized bug still exists, but I'm not
convinced it was ever fixed.
Update #28700
Change-Id: I4854de616364510f64a6def30b308686563f8dbb
Reviewed-on: https://go-review.googlesource.com/c/go/+/179757
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src/archive/zip/reader.go')
-rw-r--r-- | src/archive/zip/reader.go | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/src/archive/zip/reader.go b/src/archive/zip/reader.go index 2260b398c3..13ff9ddcf4 100644 --- a/src/archive/zip/reader.go +++ b/src/archive/zip/reader.go @@ -8,7 +8,6 @@ import ( "bufio" "encoding/binary" "errors" - "fmt" "hash" "hash/crc32" "io" @@ -84,9 +83,6 @@ func (z *Reader) init(r io.ReaderAt, size int64) error { if err != nil { return err } - if end.directoryRecords > uint64(size)/fileHeaderLen { - return fmt.Errorf("archive/zip: TOC declares impossible %d files in %d byte zip", end.directoryRecords, size) - } z.r = r z.File = make([]*File, 0, end.directoryRecords) z.Comment = end.comment |