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
image/jpeg: panic while decoding a JPEG image #4259
Labels
Milestone
Comments
Labels changed: added priority-later, removed priority-triage. Owner changed to @nigeltao. Status changed to Accepted. |
hg bisect shows that this was introduced by the change for decoding progressive jpegs: http://code.google.com/p/go/source/detail?r=51f26e36ba98 |
Ah, that particular image has a 2x2 sampling factor, which is common for color JPEG images (e.g. 2x2,1x1,1x1 corresponds to YCbCr 4:2:0), but is a weird thing to do for grayscale JPEG images. Still, I guess it's valid, and Go shouldn't choke on it. Re comment #1, you're right that it's a bug if the Go JPEG decoder ever panics on corrupt input, but FWIW, I'm glad it panicked when it did. If this code wasn't in a bounds-checked language (like C) then the decoder would happily have overwritten an unsafe memory region and we would never have noticed the bug as easily. Sorry for the late response, though. Re comment #6, the code change for progressive images changed the symptoms from error to panic, but the underlying bug existed beforehand in go1.0.3, as the OP noted. I've mailed out a fix at https://golang.org/cl/7069045 |
This issue was closed by revision 30ff063. Status changed to Fixed. |
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
by samuel.stauffer:
Attachments:
The text was updated successfully, but these errors were encountered: