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: Decoding returns EOF instead of ErrUnexpectedEOF for JPEG files with missing segments #6450
Labels
Comments
Labels changed: added priority-later, packagebug, removed priority-triage. Owner changed to @nigeltao. Status changed to Accepted. |
Comment 3 by rdamazio@google.com: Just a thought - maybe it should return err AND img, with img containing partial contents like what's rendered above. |
I agree with the general sentiment, although I think it should be a jpeg.FormatError instead of io.ErrUnexpectedEOF. As for comment #3, I generally don't like being "liberal in what we accept"; this is arguably simply an invalid JPEG image. Yes, there is already precedent in the image/jpeg code in being a little liberal, but I didn't really like that either. If your program really needs to accept corrupted JPEG images, then you can always fork image/jpeg. |
This issue was closed by revision c2013e8. 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.
Attachments:
The text was updated successfully, but these errors were encountered: