From e01250230b1ad85e49cc0021365d1ee43feb9855 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 31 Oct 2018 18:14:00 -0700 Subject: [PATCH] [hmtx/vmtx] Fix a crasher --- src/hb-ot-hmtx-table.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hb-ot-hmtx-table.hh b/src/hb-ot-hmtx-table.hh index 607358584..1eb6cc68f 100644 --- a/src/hb-ot-hmtx-table.hh +++ b/src/hb-ot-hmtx-table.hh @@ -255,7 +255,7 @@ struct hmtxvmtx if (glyph < num_advances) return table->longMetricZ[glyph].sb; - if (unlikely (glyph > num_metrics)) + if (unlikely (glyph >= num_metrics)) return 0; const FWORD *bearings = (const FWORD *) &table->longMetricZ[num_advances];