diff options
author | Brian Gianforcaro <bgianf@serenityos.org> | 2021-12-23 01:49:27 -0800 |
---|---|---|
committer | Brian Gianforcaro <b.gianfo@gmail.com> | 2021-12-23 17:43:31 -0800 |
commit | 0a827eaa028e648fb9e42fd02564ab1647a4e190 (patch) | |
tree | 91fa90eff3060ee4e635e0bbeabe115903b08474 /Userland/Libraries/LibGfx/ICOLoader.cpp | |
parent | da6aef9fff2da278a47394493520228b3b30299b (diff) | |
download | serenity-0a827eaa028e648fb9e42fd02564ab1647a4e190.zip |
LibGfx: Fix incorrect error handling in ICOLoader
This was found by OSS Fuzz:
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=42188
Diffstat (limited to 'Userland/Libraries/LibGfx/ICOLoader.cpp')
-rw-r--r-- | Userland/Libraries/LibGfx/ICOLoader.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibGfx/ICOLoader.cpp b/Userland/Libraries/LibGfx/ICOLoader.cpp index 1ff99ad6c4..3c4edf850d 100644 --- a/Userland/Libraries/LibGfx/ICOLoader.cpp +++ b/Userland/Libraries/LibGfx/ICOLoader.cpp @@ -264,7 +264,7 @@ static bool load_ico_bitmap(ICOLoadingContext& context, Optional<size_t> index) PNGImageDecoderPlugin png_decoder(context.data + desc.offset, desc.size); if (png_decoder.sniff()) { auto decoded_png_frame = png_decoder.frame(0); - if (!decoded_png_frame.is_error() || !decoded_png_frame.value().image) { + if (decoded_png_frame.is_error() || !decoded_png_frame.value().image) { dbgln_if(ICO_DEBUG, "load_ico_bitmap: failed to load PNG encoded image index: {}", real_index); return false; } |