Skip to content

archive/zip: CL 6811080 broke the ability to read a zip file #4393

Description

@gopherbot

by mpvanlohuizen:

What steps will reproduce the problem?
If possible, include a link to a program on play.golang.org.
1. Download attached go and zip file.
2. Run the go program. 
3. It will panic:

What is the expected output?
The expected output is not to panic.

What do you see instead?
panic: zip: not a valid zip file

Which compiler are you using (5g, 6g, 8g, gccgo)?
6g

Which operating system are you using?
MacOS X 10.8.2

Which version are you using?  (run 'go version')
go version devel +f5c69f87ef34 Mon Nov 12 12:21:00 2012 +0100

Please provide any additional information below.
This bug was introduced with CL 6811080:
archive/zip: Fix bounds check panic for ZIP files with a truncated extra header.
from dave, reviewed by adg.

Attachments:

  1. testzip.go (379 bytes)
  2. core.zip (5222881 bytes)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions