diff options
author | Behdad Esfahbod <behdad@behdad.org> | 2014-07-16 12:30:39 -0400 |
---|---|---|
committer | Behdad Esfahbod <behdad@behdad.org> | 2014-07-16 12:30:39 -0400 |
commit | e7ce50d9eb6e3678f731b10dfeb308ffc478af8d (patch) | |
tree | 9847fa9ecdd1133a762d4e112eb23ec082ba269d | |
parent | 73e23b0acfd2948d500321769035c56c9e072d77 (diff) |
[indic] Fix access past end of array
-rw-r--r-- | src/hb-ot-shape-complex-indic.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/hb-ot-shape-complex-indic.cc b/src/hb-ot-shape-complex-indic.cc index 02087a05..5bb1f338 100644 --- a/src/hb-ot-shape-complex-indic.cc +++ b/src/hb-ot-shape-complex-indic.cc @@ -1372,9 +1372,10 @@ final_reordering_syllable (const hb_ot_shape_plan_t *plan, if (base == end && start < base && is_one_of (info[base - 1], FLAG (OT_ZWJ))) base--; - while (start < base && - is_one_of (info[base], (FLAG (OT_N) | HALANT_OR_COENG_FLAGS))) - base--; + if (base < end) + while (start < base && + is_one_of (info[base], (FLAG (OT_N) | HALANT_OR_COENG_FLAGS))) + base--; /* o Reorder matras: |