[sfnt] Fix previous commit (#48901). * src/sfnt/ttcmap.c (tt_cmap4_char_map_binary): Thinkos.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
diff --git a/ChangeLog b/ChangeLog
index 0fc1a9d..07e190e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2016-08-25 Werner Lemberg <wl@gnu.org>
+ [sfnt] Fix previous commit (#48901).
+
+ * src/sfnt/ttcmap.c (tt_cmap4_char_map_binary): Thinkos.
+
+2016-08-25 Werner Lemberg <wl@gnu.org>
+
[sfnt] Speed up handling of invalid format 4 cmaps.
* src/sfnt/ttcmap.c (tt_cmap4_next, tt_cmap4_char_map_binary): Add
diff --git a/src/sfnt/ttcmap.c b/src/sfnt/ttcmap.c
index 0e0479d..cd7467d 100644
--- a/src/sfnt/ttcmap.c
+++ b/src/sfnt/ttcmap.c
@@ -1376,7 +1376,7 @@
/* if p > limit, the whole segment is invalid */
if ( next && p > limit )
- continue;
+ break;
gindex = TT_PEEK_USHORT( p );
if ( gindex )
@@ -1404,9 +1404,6 @@
else if ( (FT_Int)charcode + delta < 0x10000L &&
(FT_Int)end + delta >= 0x10000L )
charcode = (FT_UInt)( 0x10000L - delta );
-
- else
- continue;
}
}