[subset] Fail ClassDefFormat1 serialization if no space available

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

No files matched your search

+1 -1
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;