diff --git a/src/hb-ot-layout-common.hh b/src/hb-ot-layout-common.hh index fe49afbde..019370908 100644 --- a/src/hb-ot-layout-common.hh +++ b/src/hb-ot-layout-common.hh @@ -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& gid_klass_pair : + it) { unsigned idx = gid_klass_pair.first - glyph_min; diff --git a/test/fuzzing/fonts/clusterfuzz-testcase-minimized-hb-subset-fuzzer-5704307501694976 b/test/fuzzing/fonts/clusterfuzz-testcase-minimized-hb-subset-fuzzer-5704307501694976 new file mode 100644 index 000000000..f2f0ec9c9 Binary files /dev/null and b/test/fuzzing/fonts/clusterfuzz-testcase-minimized-hb-subset-fuzzer-5704307501694976 differ