summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@behdad.org>2018-10-14 19:30:44 -0700
committerBehdad Esfahbod <behdad@behdad.org>2018-10-14 19:30:44 -0700
commit7efa38257b6f79d1c6e2a9bad29c33af276abe29 (patch)
tree7500fc77e34cfe88c4ae3d15f169e7cdb476ac4d
parente1add2a275a8afa5efc22aa44a4e62646f0b0ba4 (diff)
[aat] More protection against buffer fail
-rw-r--r--src/hb-aat-layout-common.hh7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/hb-aat-layout-common.hh b/src/hb-aat-layout-common.hh
index eda5151c..432b9e85 100644
--- a/src/hb-aat-layout-common.hh
+++ b/src/hb-aat-layout-common.hh
@@ -507,9 +507,10 @@ struct StateTableDriver
if (!c->in_place)
{
- for (; buffer->idx < buffer->len;)
- buffer->next_glyph ();
- buffer->swap_buffers ();
+ for (; buffer->successful && buffer->idx < buffer->len;)
+ buffer->next_glyph ();
+ if (likely (buffer->successful))
+ buffer->swap_buffers ();
}
}