[ot] Fix Extension type recurse to disallow recursing to another Extension
Particularly hazardous if the second layer mixes forward and backward lookups. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=4336
This commit is contained in:
parent
7ab49de987
commit
16fba5b215
@ -1280,9 +1280,11 @@ struct SubstLookup : Lookup
|
||||
if (unlikely (get_type () == SubstLookupSubTable::Extension))
|
||||
{
|
||||
/* The spec says all subtables of an Extension lookup should
|
||||
* have the same type. This is specially important if one has
|
||||
* a reverse type! */
|
||||
* have the same type, which shall not be the Extension type
|
||||
* itself. This is specially important if one has a reverse type! */
|
||||
unsigned int type = get_subtable (0).u.extension.get_type ();
|
||||
if (unlikely (type == SubstLookupSubTable::Extension))
|
||||
return_trace (false);
|
||||
unsigned int count = get_subtable_count ();
|
||||
for (unsigned int i = 1; i < count; i++)
|
||||
if (get_subtable (i).u.extension.get_type () != type)
|
||||
|
Binary file not shown.
Binary file not shown.
@ -17,3 +17,5 @@ fonts/sha1sum/b6acef662e0beb8d5fcf5b61c6b0ca69537b7402.ttf:--font-funcs=ot:U+004
|
||||
fonts/sha1sum/e88c339237f52d21e01c55f01b9c1b4cc14a0467.ttf:--font-funcs=ot:U+0041:[gid0=0+1000]
|
||||
fonts/sha1sum/243798dd281c1c77c065958e1ff467420faa9bde.ttf:--font-funcs=ot:U+0041:[gid0=0+1000]
|
||||
fonts/sha1sum/dd9f0c7c7c36f75a18be0cab1cddf8f3ab0f366b.ttf:--font-funcs=ot --no-positions --no-clusters --no-glyph-names:U+0041:[0|0|2|0|0|2|0|0|2|0|0|2|0|0|2|0|0|2|0|0|0|2|0|0|0|2|0|0|2|0|0|2|0|0|2|0|0|2|0|0|0|2|0|0|2|0|0|2|0|0|2|0]
|
||||
fonts/sha1sum/ef2511f215aa3ca847cbfffbf861793b42170875.ttf:--font-funcs=ot:U+0041:[gid0=0+1000]
|
||||
fonts/sha1sum/9d8a94a67932a3ab75a596fc8b5c6d0392ca9e49.ttf:--font-funcs=ot:U+0041:[gid0=0+1000]
|
||||
|
Loading…
Reference in New Issue
Block a user