mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-26 01:11:25 +01:00
[repacker] validate link widths during repacker setup.
This commit is contained in:
1 parent
edf7a29595
commit
9e99d08470
2 files changed
+7
-2
No files matched your search
@@ -58,6 +58,13 @@ struct graph_t
|
||||
unsigned start = l.position;
|
||||
unsigned end = start + l.width - 1;
|
||||
|
||||
if (unlikely (l.width < 2 || l.width > 4))
|
||||
{
|
||||
DEBUG_MSG (SUBSET_REPACK, nullptr,
|
||||
"Invalid graph. Invalid link width.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (unlikely (end >= table_size ()))
|
||||
{
|
||||
DEBUG_MSG (SUBSET_REPACK, nullptr,
|
||||
|
||||
@@ -111,8 +111,6 @@ extern "C" int LLVMFuzzerTestOneInput (const uint8_t *data, size_t size)
|
||||
if (links[i].parent >= num_objects
|
||||
|| links[i].child > links[i].parent) // Enforces DAG graph
|
||||
goto end;
|
||||
|
||||
if (links[i].width < 2 || links[i].width > 4) goto end;
|
||||
}
|
||||
|
||||
add_links_to_objects (objects, num_objects,
|
||||
|
||||
Reference in new issue
Block a user