[HarfBuzz] harfbuzz-ng: Branch 'master'

Behdad Esfahbod behdad at kemper.freedesktop.org
Mon Dec 13 11:23:46 PST 2010


 src/hb-ot-layout-gsub-private.hh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit b7683335146bfe3a74d9419db92cd7a8019a9c10
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Mon Dec 13 14:22:35 2010 -0500

    Disallow ligature substitutions replacing one glyph

diff --git a/src/hb-ot-layout-gsub-private.hh b/src/hb-ot-layout-gsub-private.hh
index 169290b..ae1c5f3 100644
--- a/src/hb-ot-layout-gsub-private.hh
+++ b/src/hb-ot-layout-gsub-private.hh
@@ -345,7 +345,7 @@ struct Ligature
     unsigned int i, j;
     unsigned int count = component.len;
     unsigned int end = MIN (c->buffer->len, c->buffer->i + c->context_length);
-    if (unlikely (c->buffer->i + count > end))
+    if (unlikely (count < 2 || c->buffer->i + count > end))
       return false;
 
     bool first_was_mark = (c->property & HB_OT_LAYOUT_GLYPH_CLASS_MARK);



More information about the HarfBuzz mailing list