[normalize] Add buffer success check before ->next_glyph()

Speculative fix for:
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=27843
This commit is contained in:
Behdad Esfahbod 2021-02-17 13:58:56 -07:00
parent 505b3fc6cf
commit bcd10bf274
1 changed files with 1 additions and 0 deletions

View File

@ -419,6 +419,7 @@ _hb_ot_shape_normalize (const hb_ot_shape_plan_t *plan,
/* Third round, recompose */ /* Third round, recompose */
if (!all_simple && if (!all_simple &&
buffer->successful &&
(mode == HB_OT_SHAPE_NORMALIZATION_MODE_COMPOSED_DIACRITICS || (mode == HB_OT_SHAPE_NORMALIZATION_MODE_COMPOSED_DIACRITICS ||
mode == HB_OT_SHAPE_NORMALIZATION_MODE_COMPOSED_DIACRITICS_NO_SHORT_CIRCUIT)) mode == HB_OT_SHAPE_NORMALIZATION_MODE_COMPOSED_DIACRITICS_NO_SHORT_CIRCUIT))
{ {