]> Cypherpunks repositories - gostls13.git/commit
archive/zip: fix size value in ZIP64 end central directory record
authorJoe Shaw <joe@joeshaw.org>
Thu, 12 Feb 2015 22:21:01 +0000 (17:21 -0500)
committerBrad Fitzpatrick <bradfitz@golang.org>
Thu, 26 Feb 2015 15:24:32 +0000 (15:24 +0000)
commit433c1ad1400047b17b9cd7107afa7afe55a04e12
tree44769b963fcac3fbbc4d334134cd1e89f86a2706
parent8b1bd75e66a818ff9d844c57ba82899ac563c3f9
archive/zip: fix size value in ZIP64 end central directory record

Section 4.3.14.1 of the ZIP file format
spec (https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT) says,

    The value stored into the "size of zip64 end of central directory
    record" should be the size of the remaining record and should not
    include the leading 12 bytes.

We were previously writing the full size, including the 12 bytes.

Fixes #9857

Change-Id: I7cf1fc8457c5f306717cbcf61e02304ab549781f
Reviewed-on: https://go-review.googlesource.com/4760
Reviewed-by: Andrew Gerrand <adg@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
src/archive/zip/writer.go
src/archive/zip/zip_test.go