From 42137bc6145c426702b90d0cec5c5acd332739ae Mon Sep 17 00:00:00 2001 From: David Turner Date: Mon, 27 Mar 2006 20:10:26 +0000 Subject: [PATCH] * src/sfnt/ttkern.c (tt_face_get_kerning): fixed a serious bug that caused some programs to go into an infinite loop when dealing with fonts that don't have a properly sorted kerning sub-table --- ChangeLog | 6 ++++++ src/sfnt/ttkern.c | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 1b81fe059..75ddb56bb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-03-27 David Turner + + * src/sfnt/ttkern.c (tt_face_get_kerning): fixed a serious bug + that caused some programs to go into an infinite loop when dealing + with fonts that don't have a properly sorted kerning sub-table + 2006-03-26 Werner Lemberg * src/bdf/bdflib.c (ERRMSG4): New macro. diff --git a/src/sfnt/ttkern.c b/src/sfnt/ttkern.c index 805efa5c3..e26427171 100644 --- a/src/sfnt/ttkern.c +++ b/src/sfnt/ttkern.c @@ -246,7 +246,9 @@ } else /* linear search */ { - for ( count = num_pairs; count > 0; count-- ) + FT_UInt count2; + + for ( count2 = num_pairs; count2 > 0; count2-- ) { FT_ULong key = FT_NEXT_ULONG( p );