mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:37:35 +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
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…
Add table
Add a link
Reference in a new issue