mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
LibGfx: skip zero-width frames
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=27913 and https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=27873
This commit is contained in:
parent
2e4832c3da
commit
86cec77eb5
Notes:
sideshowbarker
2024-07-19 01:11:44 +09:00
Author: https://github.com/nico Commit: https://github.com/SerenityOS/serenity/commit/86cec77eb59 Pull-request: https://github.com/SerenityOS/serenity/pull/4244
1 changed files with 4 additions and 3 deletions
|
@ -354,12 +354,13 @@ static bool decode_frame(GIFLoadingContext& context, size_t frame_index)
|
|||
if (code.value() == clear_code) {
|
||||
decoder.reset();
|
||||
continue;
|
||||
} else if (code.value() == end_of_information_code) {
|
||||
break;
|
||||
}
|
||||
if (code.value() == end_of_information_code)
|
||||
break;
|
||||
if (!image.width)
|
||||
continue;
|
||||
|
||||
auto colors = decoder.get_output();
|
||||
|
||||
for (const auto& color : colors) {
|
||||
auto c = color_map[color];
|
||||
|
||||
|
|
Loading…
Reference in a new issue