Closed garretrieger closed 5 months ago
Useful to have these limits to prevent Denial of Service attacks from carefully-crafted fonts. So this should perhaps be called out in the Security section? But that can easily be a separate PR, no need to hold this one up.
Good idea, that would definitely be good to discuss there.
I've introduced two mechanisms to limit the number of iterations that can be made in the extension algorithm (to prevent malformed/bad fonts from causing an excessive or infinite number of iterations):
The specific numeric limits are a first pass and I'm open to discussion on what would be good values for these limits.
Preview | Diff