1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 16:07:47 +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:
Idan Horowitz 2021-04-07 17:23:36 +03:00 committed by Andreas Kling
parent f0bd17e610
commit 8a0f1d87c0

View file

@ -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)