Avoid overflow

This commit is contained in:
Behdad Esfahbod 2009-12-20 18:22:28 +01:00
parent 26d7a75752
commit 51f141a7f3
1 changed files with 2 additions and 0 deletions

View File

@ -93,6 +93,8 @@ hb_map_glyphs (hb_font_t *font,
{
unsigned int count;
if (HB_UNLIKELY (!buffer->in_length))
return;
count = buffer->in_length - 1;
for (buffer->in_pos = 0; buffer->in_pos < count; buffer->in_pos++) {
if (HB_UNLIKELY (is_variation_selector (IN_NEXTGLYPH()))) {