[subset] Fail ClassDefFormat1 serialization if no space available
Fixes https://crbug.com/oss-fuzz/21580
This commit is contained in:
parent
c8cc1e378d
commit
57b7de032f
|
@ -1651,7 +1651,7 @@ struct ClassDefFormat1
|
||||||
unsigned glyph_count = glyph_max - glyph_min + 1;
|
unsigned glyph_count = glyph_max - glyph_min + 1;
|
||||||
|
|
||||||
startGlyph = glyph_min;
|
startGlyph = glyph_min;
|
||||||
classValue.serialize (c, glyph_count);
|
if (unlikely (!classValue.serialize (c, glyph_count))) return_trace (false);
|
||||||
for (const hb_pair_t<hb_codepoint_t, unsigned>& gid_klass_pair : + it)
|
for (const hb_pair_t<hb_codepoint_t, unsigned>& gid_klass_pair : + it)
|
||||||
{
|
{
|
||||||
unsigned idx = gid_klass_pair.first - glyph_min;
|
unsigned idx = gid_klass_pair.first - glyph_min;
|
||||||
|
|
Binary file not shown.
Loading…
Reference in New Issue