mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00:00
LibGfx: Fix incorrect error handling in ICOLoader
This was found by OSS Fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=42188
This commit is contained in:
parent
da6aef9fff
commit
0a827eaa02
Notes:
sideshowbarker
2024-07-17 22:18:29 +09:00
Author: https://github.com/bgianfo Commit: https://github.com/SerenityOS/serenity/commit/0a827eaa028 Pull-request: https://github.com/SerenityOS/serenity/pull/11379
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue