You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yeah, it makes sense there that we basically read off the end of the input. The consequence is that we throw an exception while trying to throw an exception, so in the end it's still throwing an exception (just maybe we could do a better job at the exception that's thrown). It's not really a goal of omggif to handle corrupted input super well or give you amazing error messages. It's a little bit more in the "garbage in garbage out" philosophy, in the name of performance, to not penalise the decoding of well-formed GIFs for the sake of making friendlier error message for invalid ones. Usually it can at least tell you it was garbage in, but I'm sure there are places where we will successful decode something that is probably technically broken.
I appreciate filing the bug though, but I would triage this as pretty low priority and not worth committing a fix for. In general I'm interested in either well formed GIFs not decoding correctly when they should (ie don't use features we don't support, etc), or invalid GIFs that somehow don't error out properly (infinite loop, etc).
Attempting to decode bytes
474946383961494638fd627a4421
raises an error:It seems to happen on line 459 of
omggif.js
:This code reproduces:
This was found by running jsfuzz on the module.
The text was updated successfully, but these errors were encountered: