-
Notifications
You must be signed in to change notification settings - Fork 18k
image/gif: check rejection of this gif #3565
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
Labels
Comments
This could be a feature. Now that I've looked at it in Chrome, I can't unsee that gif. Labels changed: added priority-later, removed priority-triage. Owner changed to @nigeltao. Status changed to Accepted. |
I looked into this a bit. I found that when the invalid code is found: code 639 litwidth 8 width 12 clear 256 eof 257 hi 90 ovf 4096 last 98 Because 639 < 90 (d.hi), it fails. I'll trace through another gif decoder and try to see what they do when receiving a code like this. |
Another GIF that causes Go problems: https://bug525326.bugzilla.mozilla.org/attachment.cgi?id=409291 Don't know if it is the same problem yet, if not, I'll file a new bug. |
I suspect this code in Webkit shows the way to making Go's gif decoder more lenient: http://trac.webkit.org/browser/trunk/Source/WebCore/platform/image-decoders/gif/GIFImageReader.cpp?rev=131831#L322 More later. |
A fix for this would involve making compress/lzw tolerant of incorrectly encoded streams. This seems like a bad idea in general. So a correct fix would need to add to the API of compress/lzw a boolean for "tolerate errors?". An API change to compress/lzw before Go 1.1 is not going to happen, so I think punting on this is the right call. The image in comment #7 is something else (issue #5050). |
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
by kballard:
Attachments:
The text was updated successfully, but these errors were encountered: