LibGfx: Don't assert on files ending right before lzw_min_code_size

Not yet found by oss-fuzz, but I hit it a while ago when running
FuzzGIFLoader locally.
This commit is contained in:
Nico Weber 2020-11-29 14:04:14 -05:00 committed by Andreas Kling
parent 86cec77eb5
commit 1f22a59f9d
Notes: sideshowbarker 2024-07-19 01:11:41 +09:00

View file

@ -569,6 +569,8 @@ static bool load_gif_frame_descriptors(GIFLoadingContext& context)
}
stream >> image.lzw_min_code_size;
if (stream.handle_any_error())
return false;
u8 lzw_encoded_bytes_expected = 0;