]> Cypherpunks repositories - gostls13.git/commit
archive/zip: handle trailing data after the end of directory header
authorAndrew Gerrand <adg@golang.org>
Mon, 8 Apr 2013 05:38:06 +0000 (15:38 +1000)
committerAndrew Gerrand <adg@golang.org>
Mon, 8 Apr 2013 05:38:06 +0000 (15:38 +1000)
commitbfcd2d1e800d78a9da9b9ab24f624c4621875ae3
treebdde27e4a5e44ae0c7cd2d6721b29688b51bd4bc
parent091970c5514567f8d44c76761f14310ae305ee86
archive/zip: handle trailing data after the end of directory header

The spec doesn't explicitly say that trailing data is okay, but a lot
of people do this and most unzippers will handle it just fine. In any
case, this makes the package more useful, and led me to make the
directory parsing code marginally more robust.

Fixes #5228.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/8504044
src/pkg/archive/zip/reader.go
src/pkg/archive/zip/reader_test.go
src/pkg/archive/zip/testdata/test-trailing-junk.zip [new file with mode: 0644]