mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-12 11:09:18 +00:00
LibGfx: Fix IHDR filter method field validation
As per the PNG specification: "Filter method is a single-byte integer that indicates the preprocessing method applied to the image data before compression. At present, only filter method 0 (adaptive filtering with five basic filter types) is defined."
This commit is contained in:
parent
f0bd17e610
commit
8a0f1d87c0
Notes:
sideshowbarker
2024-07-18 20:39:32 +09:00
Author: https://github.com/IdanHo
Commit: 8a0f1d87c0
Pull-request: https://github.com/SerenityOS/serenity/pull/6181
Issue: https://github.com/SerenityOS/serenity/issues/6180
1 changed files with 1 additions and 1 deletions
|
@ -829,7 +829,7 @@ static bool is_valid_compression_method(u8 compression_method)
|
|||
|
||||
static bool is_valid_filter_method(u8 filter_method)
|
||||
{
|
||||
return filter_method <= 4;
|
||||
return filter_method == 0;
|
||||
}
|
||||
|
||||
static bool process_IHDR(ReadonlyBytes data, PNGLoadingContext& context)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue