RESOLVED FIXED 241839
GIFImageDecoder: Can't render some corrupted GIF images of the 88x31 GIF Collection
https://bugs.webkit.org/show_bug.cgi?id=241839
Summary GIFImageDecoder: Can't render some corrupted GIF images of the 88x31 GIF Coll...
Fujii Hironori
Reported 2022-06-21 22:21:10 PDT
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.
Attachments
WIP patch (1.42 KB, patch)
2022-06-22 00:01 PDT, Fujii Hironori
no flags
Patch (3.89 KB, patch)
2022-06-22 01:01 PDT, Fujii Hironori
no flags
Fujii Hironori
Comment 1 2022-06-21 22:35:43 PDT
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"
Fujii Hironori
Comment 2 2022-06-21 23:30:22 PDT
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
Fujii Hironori
Comment 3 2022-06-22 00:01:25 PDT
Created attachment 460405 [details] WIP patch
Fujii Hironori
Comment 4 2022-06-22 01:01:10 PDT
Fujii Hironori
Comment 5 2022-06-22 01:10:27 PDT
Darin Adler
Comment 6 2022-06-22 09:27:03 PDT
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
EWS
Comment 7 2022-06-23 17:50:05 PDT
Committed 251813@main (9bdfe6d4600b): <https://commits.webkit.org/251813@main> Reviewed commits have been landed. Closing PR #1678 and removing active labels.
Radar WebKit Bug Importer
Comment 8 2022-06-23 17:51:14 PDT
Note You need to log in before you can comment on or make changes to this bug.