diff --git a/src/graph/markbasepos-graph.hh b/src/graph/markbasepos-graph.hh index 84ef5f71b..5e9d5aea3 100644 --- a/src/graph/markbasepos-graph.hh +++ b/src/graph/markbasepos-graph.hh @@ -319,7 +319,8 @@ struct MarkBasePosFormat1 : public OT::Layout::GPOS_impl::MarkBasePosFormat1_2 class_to_info; unsigned class_count= classCount; - class_to_info.resize (class_count); + if (!class_to_info.resize (class_count)) + return hb_vector_t(); auto mark_array = c.graph.as_table (this_index, &markArray); if (!mark_array) return hb_vector_t (); @@ -327,6 +328,7 @@ struct MarkBasePosFormat1 : public OT::Layout::GPOS_impl::MarkBasePosFormat1_2= class_count) continue; class_to_info[klass].marks.add (mark); } @@ -335,6 +337,7 @@ struct MarkBasePosFormat1 : public OT::Layout::GPOS_impl::MarkBasePosFormat1_2= class_count) continue; class_to_info[klass].child_indices.push (link.objidx); } diff --git a/test/fuzzing/graphs/clusterfuzz-testcase-minimized-hb-repacker-fuzzer-5196242811748352 b/test/fuzzing/graphs/clusterfuzz-testcase-minimized-hb-repacker-fuzzer-5196242811748352 new file mode 100644 index 000000000..9665e7909 Binary files /dev/null and b/test/fuzzing/graphs/clusterfuzz-testcase-minimized-hb-repacker-fuzzer-5196242811748352 differ