[subset] if table dependencies can't be resolved fail the subset.

Avoids getting stuck in an infinite loop.
This commit is contained in:
Garret Rieger 2022-12-12 19:43:31 +00:00
parent 6bb478eeeb
commit 0853e5d9d7
1 changed files with 6 additions and 0 deletions

View File

@ -604,6 +604,12 @@ hb_subset_plan_execute_or_fail (hb_subset_plan_t *plan)
success = _subset_table (plan, buf, tag);
if (unlikely (!success)) goto end;
}
if (revisit_set == revisit_temp) {
DEBUG_MSG (SUBSET, nullptr, "Table dependencies unable to be satisfied. Subset failed.");
success = false;
goto end;
}
revisit_set = revisit_temp;
}
offset += num_tables;