From bcd10bf2741266e16d514269cc1c8902105187db Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 17 Feb 2021 13:58:56 -0700 Subject: [PATCH] [normalize] Add buffer success check before ->next_glyph() Speculative fix for: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=27843 --- src/hb-ot-shape-normalize.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/hb-ot-shape-normalize.cc b/src/hb-ot-shape-normalize.cc index 3eabae1b4..1453d2e3b 100644 --- a/src/hb-ot-shape-normalize.cc +++ b/src/hb-ot-shape-normalize.cc @@ -419,6 +419,7 @@ _hb_ot_shape_normalize (const hb_ot_shape_plan_t *plan, /* Third round, recompose */ if (!all_simple && + buffer->successful && (mode == HB_OT_SHAPE_NORMALIZATION_MODE_COMPOSED_DIACRITICS || mode == HB_OT_SHAPE_NORMALIZATION_MODE_COMPOSED_DIACRITICS_NO_SHORT_CIRCUIT)) {