1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-09 09:34:57 +09:00

LibGfx/WOFF2: Ensure numTables is within expected range

An error is now returned if `numTables` is zero or greater than 4096.
While this isn't explicitly mentioned in the specification, subsequent
calculations will be incorrect if the value falls outside this range.
This commit is contained in:
Tim Ledbetter 2023-10-25 21:46:50 +01:00 committed by Andreas Kling
parent e48b3b39cf
commit 52f78d07b8
Notes: sideshowbarker 2024-07-17 01:28:15 +09:00
3 changed files with 4 additions and 1 deletions

View file

@ -24,7 +24,8 @@ TEST_CASE(tolerate_incorrect_sfnt_size)
TEST_CASE(malformed_woff2)
{
Array test_inputs = {
TEST_INPUT("woff2/incorrect_compressed_size.woff2"sv)
TEST_INPUT("woff2/incorrect_compressed_size.woff2"sv),
TEST_INPUT("woff2/invalid_numtables.woff2"sv)
};
for (auto test_input : test_inputs) {