diff --git a/src/hb-graphite2.cc b/src/hb-graphite2.cc index 807c33087..26619e1ce 100644 --- a/src/hb-graphite2.cc +++ b/src/hb-graphite2.cc @@ -269,6 +269,7 @@ _hb_graphite2_shape (hb_shape_plan_t *shape_plan, gr_seg_destroy (seg); return false; } + buffer->ensure (glyph_count); scratch = buffer->get_scratch_buffer (&scratch_size); while ((DIV_CEIL (sizeof (hb_graphite2_cluster_t) * buffer->len, sizeof (*scratch)) +