diff options
author | Nico Weber <thakis@chromium.org> | 2020-11-29 14:04:14 -0500 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-11-29 20:21:30 +0100 |
commit | 1f22a59f9d0f442eec37f8dab9ee4f6577c00caf (patch) | |
tree | 137ebb7dd0e77c2cfe2f6a848c55f8c846687577 /Libraries | |
parent | 86cec77eb59185e1b04a5a5c5fe0b649dab3d923 (diff) | |
download | serenity-1f22a59f9d0f442eec37f8dab9ee4f6577c00caf.zip |
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.
Diffstat (limited to 'Libraries')
-rw-r--r-- | Libraries/LibGfx/GIFLoader.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Libraries/LibGfx/GIFLoader.cpp b/Libraries/LibGfx/GIFLoader.cpp index 63feed39c8..0fc1c42ff8 100644 --- a/Libraries/LibGfx/GIFLoader.cpp +++ b/Libraries/LibGfx/GIFLoader.cpp @@ -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; |