]> Cypherpunks repositories - gostls13.git/commit
archive/zip: fix reading, writing of zip64 archives
authorRuss Cox <rsc@golang.org>
Wed, 6 Jan 2016 17:22:16 +0000 (12:22 -0500)
committerRuss Cox <rsc@golang.org>
Thu, 7 Jan 2016 00:44:04 +0000 (00:44 +0000)
commit4aedbf5be4631693f774063410707ef467ca78e7
treefb8ee4b8d9f4856cf4d028abf51644bd45ea358f
parent5d8442aeaaa852486b39049f6d4c3d79c87be011
archive/zip: fix reading, writing of zip64 archives

Read zip files that contain only 64-bit header offset, not 64-bit sizes.
Fixes #13367.

Read zip files that contain completely unexpected Extra fields,
provided we do not need to find 64-bit size or header offset information there.
Fixes #13166.

Write zip file entries with 0xFFFFFFFF uncompressed data bytes
correctly (must use zip64 header, since that's the magic indicator).
Fixes new TestZip64EdgeCase. (Noticed while working on the CL.)

Change-Id: I84a22b3995fafab8052b99de8094a9f35a25de5b
Reviewed-on: https://go-review.googlesource.com/18317
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/archive/zip/reader.go
src/archive/zip/struct.go
src/archive/zip/writer.go
src/archive/zip/zip_test.go