From d72d37008d25d346b73a24087202bbf957733121 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 1 Jun 2022 04:43:10 -0600 Subject: [PATCH] [shape] Allow null buffer Ouch! --- src/hb-shape.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/hb-shape.cc b/src/hb-shape.cc index 83d3a04ea..627625451 100644 --- a/src/hb-shape.cc +++ b/src/hb-shape.cc @@ -126,6 +126,9 @@ hb_shape_full (hb_font_t *font, unsigned int num_features, const char * const *shaper_list) { + if (unlikely (!buffer->len)) + return true; + hb_buffer_t *text_buffer = nullptr; if (buffer->flags & HB_BUFFER_FLAG_VERIFY) {