We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The following program crashes with the panic:
package main import ( "archive/zip" "bytes" "hash/crc32" "io/ioutil" ) func main() { data := []byte("PK\x03\x040000000000000000" + "000000\x01\x00\x00\x000\x01\x00\x00\xff\xff0000" + "0000000000000000PK\x01\x02" + "0000\b0\b\x00000000000000" + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x000000PK\x05\x06\x00\x00" + "\x00\x0000\x01\x0000008\x00\x00\x00\x00\x00") z, err := zip.NewReader(bytes.NewReader(data), int64(len(data))) if err != nil { panic(err) } for _, f := range z.File { r, err := f.Open() if err != nil { panic(err) } c, err := ioutil.ReadAll(r) if err != nil { panic(err) } if crc := crc32.ChecksumIEEE(c); crc != f.CRC32 { println(crc, f.CRC32) panic("bad checksum") } r.Close() } }
0 808464432 panic: bad checksum
go version devel +b0532a9 Mon Jun 8 05:13:15 2015 +0000 linux/amd64
The text was updated successfully, but these errors were encountered:
CL https://golang.org/cl/11070 mentions this issue.
Sorry, something went wrong.
48d865a
No branches or pull requests
The following program crashes with the panic:
go version devel +b0532a9 Mon Jun 8 05:13:15 2015 +0000 linux/amd64
The text was updated successfully, but these errors were encountered: