mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 08:37:45 +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
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)
|
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)
|
static bool process_IHDR(ReadonlyBytes data, PNGLoadingContext& context)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue