diff --git a/src/hb-aat-layout-morx-table.hh b/src/hb-aat-layout-morx-table.hh index ddb444c21..3f5f29d1d 100644 --- a/src/hb-aat-layout-morx-table.hh +++ b/src/hb-aat-layout-morx-table.hh @@ -402,7 +402,11 @@ struct LigatureSubtable do { if (unlikely (!cursor)) + { + /* Stack underflow. Clear the stack. */ + match_length = 0; break; + } buffer->move_to (match_positions[--cursor]);