GIFImageDecoder: Can't render some corrupted GIF images of the 88x31 GIF Collection Non-cocoa ports are uing GIFImageDecoder. It can't render some images of https://cyber.dabamos.de/88x31/ , but Safari, Chrome and Firefox can. For example, https://cyber.dabamos.de/88x31/besteyes2.gif https://cyber.dabamos.de/88x31/epicenter.gif https://cyber.dabamos.de/88x31/filetransit.gif GIFImageReader.cpp determines they are corrupted in the following condition. `*currentComponent` was 0. https://github.com/WebKit/WebKit/blob/49c1b53f803fe6952e293bfde206b22dc4ceadef/Source/WebCore/platform/image-decoders/gif/GIFImageReader.cpp#L502-L508 > // If we get anything other than ',' (image separator), '!' > // (extension), or ';' (trailer), there is extraneous data > // between blocks. The GIF87a spec tells us to keep reading > // until we find an image separator, but GIF89a says such > // a file is corrupt. We follow GIF89a and bail out. > if (*currentComponent != ',') > return false; 10635@main added the code.
These GIF contain the following comments: > http://www.rtlsoft.com/animagic Created with Animagic GIF V 0.93 by Right to Left Software Inc. > http://www.rtlsoft.com/animagic Created with Animagic GIF V 1.02a by Right to Left Software Inc > http://www.rtlsoft.com/animagic Created with Animagic GIF V 1.05a by Right to Left Software Inc. To suppress this message in the registered version uncheck "Options | Animagic comment frame"
Chromium's change. 242957 - Be more tolerant about corrupted GIF files - chromium https://bugs.chromium.org/p/chromium/issues/detail?id=242957 Issue 15914009: More tolerant about malformed GIF files - Code Review https://codereview.chromium.org/15914009
Created attachment 460405 [details] WIP patch
Created attachment 460410 [details] Patch
Pull request: https://github.com/WebKit/WebKit/pull/1678
Comment on attachment 460410 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=460410&action=review > COMMIT_MESSAGE:1 > +GIFImageReader: Be torrent about invalid GIF files without a trailer(;) torrent -> tolerant
Committed 251813@main (9bdfe6d4600b): <https://commits.webkit.org/251813@main> Reviewed commits have been landed. Closing PR #1678 and removing active labels.
<rdar://problem/95820038>