提交 075d671f 编写于 作者: B Behdad Esfahbod

[Indic] Fix out-of-bounds array access

上级 dcb52724
...@@ -475,7 +475,8 @@ initial_reordering_consonant_syllable (const hb_ot_map_t *map, hb_buffer_t *buff ...@@ -475,7 +475,8 @@ initial_reordering_consonant_syllable (const hb_ot_map_t *map, hb_buffer_t *buff
for (unsigned int i = start; i < base; i++) for (unsigned int i = start; i < base; i++)
info[i].indic_position() = POS_PRE_C; info[i].indic_position() = POS_PRE_C;
info[base].indic_position() = POS_BASE_C; if (base < end)
info[base].indic_position() = POS_BASE_C;
/* Mark final consonants. A final consonant is one appearing after a matra, /* Mark final consonants. A final consonant is one appearing after a matra,
* like in Khmer. */ * like in Khmer. */
...@@ -577,7 +578,8 @@ initial_reordering_consonant_syllable (const hb_ot_map_t *map, hb_buffer_t *buff ...@@ -577,7 +578,8 @@ initial_reordering_consonant_syllable (const hb_ot_map_t *map, hb_buffer_t *buff
info[i].mask |= mask; info[i].mask |= mask;
/* Base */ /* Base */
mask = basic_mask_array[AKHN] | basic_mask_array[CJCT]; mask = basic_mask_array[AKHN] | basic_mask_array[CJCT];
info[base].mask |= mask; if (base < end)
info[base].mask |= mask;
/* Post-base */ /* Post-base */
mask = basic_mask_array[BLWF] | basic_mask_array[ABVF] | basic_mask_array[PSTF] | basic_mask_array[CJCT]; mask = basic_mask_array[BLWF] | basic_mask_array[ABVF] | basic_mask_array[PSTF] | basic_mask_array[CJCT];
for (unsigned int i = base + 1; i < end; i++) for (unsigned int i = base + 1; i < end; i++)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册