[subset] Fail ClassDefFormat1 serialization if no space available

Fixes https://crbug.com/oss-fuzz/21580
This commit is contained in:
Ebrahim Byagowi 2020-04-05 17:07:48 +04:30
parent c8cc1e378d
commit 57b7de032f
2 changed files with 1 additions and 1 deletions

View File

@ -1651,7 +1651,7 @@ struct ClassDefFormat1
unsigned glyph_count = glyph_max - glyph_min + 1;
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)
{
unsigned idx = gid_klass_pair.first - glyph_min;