]> Cypherpunks repositories - gostls13.git/commit
archive/zip: fixes unexpected EOF when reading archive
authoralexander demakin <alexander.demakin@gmail.com>
Thu, 10 Sep 2015 16:43:20 +0000 (19:43 +0300)
committerAndrew Gerrand <adg@golang.org>
Fri, 11 Sep 2015 00:32:59 +0000 (00:32 +0000)
commit2b50e6b4583ee72254ca61a689ae63f9189543f7
tree2733759ba90058e288f923cde1fe671c7e16d7a3
parent3f2baa3e60b54b5cfc45995d7d3616d4a9a509fb
archive/zip: fixes unexpected EOF when reading archive

If comment of the archive contains data which looks like
a zip64 directory, the comment is parsed as an
actual directory header.
Commit adds some additional checks similar to the checks
in minizip library.

Fixes #12449

Change-Id: Ia0fc950e47b9c39f77d88401b9ca30100ca7c808
Reviewed-on: https://go-review.googlesource.com/14433
Run-TryBot: Andrew Gerrand <adg@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Andrew Gerrand <adg@golang.org>
src/archive/zip/reader.go
src/archive/zip/reader_test.go