fontations
fontations copied to clipboard
Audit for code that can lead to excessive runtime with malicious/malformed data
Specifically cases where we loop based on untrusted counts and/or iterate over ranges where the the sizes aren't bounded by data and thus caught during parsing.
For example, the iterator for cmap format 12 can be forced to do 2^32 iterations n times where cost is only n * 12 bytes of malicious data.
@behdad does HB protect against this? Have a budget for instance?
Yes we have a budgets for a lot of operations. For cmap I think we skip anything outside valid Unicode range.
To create the xref, #954 fixes this for cmap12.