New issue
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
compress/lzw: panic: index out of range in reader #20597
Comments
Thats, uh, an interesting image. Smaller reproducer
|
Indeed. Sorry for the incorrect attribution.
…On Wed, Jun 7, 2017 at 6:39 PM, David Symonds ***@***.***> wrote:
@nigeltao <https://github.com/nigeltao> would be the culprit if it's
642a1cc
<642a1cc>
.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#20597 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAAcA18asmlmeF74r9DNCZFV5YCGNxNTks5sBmGtgaJpZM4NyXIW>
.
|
Well, I carry some of the blame, since I reviewed his code. You would have thought I'd have learned by now... ;-) |
Sorry, just boring data from the logs, but i should've picked a more decent one. :) So, here's another, from |
The new image code should definitely be fuzzed. |
CL https://golang.org/cl/45111 mentions this issue. |
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?go version devel +90b39f33c4 Wed Jun 7 05:55:11 2017 +0000 linux/amd64
What operating system and processor architecture are you using (
go env
)?linux amd64
What did you do?
https://play.golang.org/p/54wxXb3tnW
What did you expect to see?
error in gif decoder or "ok\n"
What did you see instead?
panic: runtime error: index out of range
goroutine 1 [running]:
compress/lzw.(*decoder).decode(0xc4200baa00)
/home/zgrim/go1.9/src/compress/lzw/reader.go:178 +0x505
compress/lzw.(*decoder).Read(0xc4200baa00, 0xc4200e406f, 0x1fe8, 0x1fe8, 0x1003, 0x0, 0x0)
/home/zgrim/go1.9/src/compress/lzw/reader.go:132 +0x2c
io.ReadAtLeast(0x7fa9a1bf4018, 0xc4200baa00, 0xc4200d6000, 0x10057, 0x10057, 0x10057, 0x44dac0, 0x7fa900000018, 0xc42004bbf8)
/home/zgrim/go1.9/src/io/io.go:307 +0x86
io.ReadFull(0x7fa9a1bf4018, 0xc4200baa00, 0xc4200d6000, 0x10057, 0x10057, 0x40ce68, 0x4bbda0, 0x4c0e60)
/home/zgrim/go1.9/src/io/io.go:325 +0x58
image/gif.readFull(0x7fa9a1bf4018, 0xc4200baa00, 0xc4200d6000, 0x10057, 0x10057, 0xc4200baa00, 0x0)
/home/zgrim/go1.9/src/image/gif/reader.go:67 +0x5a
image/gif.(*decoder).decode(0xc420090000, 0x5453a0, 0xc42000c080, 0x0, 0x0, 0x0)
/home/zgrim/go1.9/src/image/gif/reader.go:228 +0x313
image/gif.Decode(0x5453a0, 0xc42000c080, 0xc42000c080, 0x0, 0x0, 0xa2)
/home/zgrim/go1.9/src/image/gif/reader.go:494 +0x5d
main.main()
/tmp/lzw/t.go:21 +0x99
exit status 2
The text was updated successfully, but these errors were encountered: