diff options
Diffstat (limited to 'Build/source/libs/harfbuzz/harfbuzz-src/src/graph/markbasepos-graph.hh')
-rw-r--r-- | Build/source/libs/harfbuzz/harfbuzz-src/src/graph/markbasepos-graph.hh | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/graph/markbasepos-graph.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/graph/markbasepos-graph.hh index 84ef5f71b93..5e9d5aea3a5 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/graph/markbasepos-graph.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/graph/markbasepos-graph.hh @@ -319,7 +319,8 @@ struct MarkBasePosFormat1 : public OT::Layout::GPOS_impl::MarkBasePosFormat1_2<S hb_vector_t<class_info_t> class_to_info; unsigned class_count= classCount; - class_to_info.resize (class_count); + if (!class_to_info.resize (class_count)) + return hb_vector_t<class_info_t>(); auto mark_array = c.graph.as_table<MarkArray> (this_index, &markArray); if (!mark_array) return hb_vector_t<class_info_t> (); @@ -327,6 +328,7 @@ struct MarkBasePosFormat1 : public OT::Layout::GPOS_impl::MarkBasePosFormat1_2<S for (unsigned mark = 0; mark < mark_count; mark++) { unsigned klass = (*mark_array.table)[mark].get_class (); + if (klass >= class_count) continue; class_to_info[klass].marks.add (mark); } @@ -335,6 +337,7 @@ struct MarkBasePosFormat1 : public OT::Layout::GPOS_impl::MarkBasePosFormat1_2<S unsigned mark = (link.position - 2) / OT::Layout::GPOS_impl::MarkRecord::static_size; unsigned klass = (*mark_array.table)[mark].get_class (); + if (klass >= class_count) continue; class_to_info[klass].child_indices.push (link.objidx); } |