From aa80c7c8b4242d61e771b28775638bf2a2c5100f Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 18 Feb 2021 09:31:46 -0700 Subject: [PATCH] [aat] Add buffer->successful check before buffer->next_glyph() --- src/hb-aat-layout-common.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hb-aat-layout-common.hh b/src/hb-aat-layout-common.hh index 75d523f5f..0f5815c22 100644 --- a/src/hb-aat-layout-common.hh +++ b/src/hb-aat-layout-common.hh @@ -778,7 +778,7 @@ struct StateTableDriver state = machine.new_state (entry.newState); DEBUG_MSG (APPLY, nullptr, "s%d", state); - if (buffer->idx == buffer->len) + if (buffer->idx == buffer->len || unlikely (!buffer->successful)) break; if (!(entry.flags & context_t::DontAdvance) || buffer->max_ops-- <= 0)