Skip to content

archive/zip: File's reader returns io.EOF prematurely #32858

Description

@dgrr

What version of Go are you using (go version)?

$ go version
go version go1.12.5 linux/amd64

Does this issue reproduce with the latest release?

Yes.

What operating system and processor architecture are you using (go env)?

$ go env
GOARCH="amd64"
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"

What did you do?

The code: https://play.golang.org/p/JvKpGINHHBY

What did you expect to see?

Not a panic.
The panic doesn't happen if you read from an *os.File, *bufio.Reader or *bytes.Reader, it only happens with the Zip files because it prematurely returns the io.EOF error.

What did you see instead?

A panic.

Edit

https://go-review.googlesource.com/c/go/+/184122

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

    Labels

    FrozenDueToAgeWaitingForInfoIssue is not actionable because of missing required information, which needs to be provided.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions