mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-09 17:49:40 +00:00
LibGfx/WebP: Remove a bounds check that is never hit
No behavior change.
This commit is contained in:
parent
04c6af7dfd
commit
69fa1d1b6e
Notes:
sideshowbarker
2024-07-17 08:34:29 +09:00
Author: https://github.com/nico
Commit: 69fa1d1b6e
Pull-request: https://github.com/SerenityOS/serenity/pull/23972
Reviewed-by: https://github.com/timschumi ✅
1 changed files with 1 additions and 2 deletions
|
@ -472,8 +472,7 @@ static ErrorOr<NonnullRefPtr<Bitmap>> decode_webp_chunk_VP8L_image(ImageKind ima
|
|||
unsigned index = symbol - (256 + 24);
|
||||
|
||||
// "b. Get ARGB color from the color cache at that index."
|
||||
if (index >= color_cache_size)
|
||||
return Error::from_string_literal("WebPImageDecoderPlugin: Color cache index out of bounds");
|
||||
// `symbol` is bounds-checked at the start of the loop.
|
||||
*pixel++ = color_cache[index];
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue