ref: 38ecc949ce1bfe4ceb567df7d8c7daf1d620fd3a
parent: 92e4662ba6a5f7d364f2138fb398d90b210b65e7
author: Werner Lemberg <[email protected]>
date: Sun Apr 22 06:14:03 EDT 2018
Another fix for handling invalid format 2 cmaps. The previous commit was incomplete. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=7928 * src/sfnt/ttcmap.c (tt_cmap2_char_next): Adjust condition to avoid an endless loop.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2018-04-22 Werner Lemberg <[email protected]>
+
+ Another fix for handling invalid format 2 cmaps.
+
+ The previous commit was incomplete.
+
+ Reported as
+
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=7928
+
+ * src/sfnt/ttcmap.c (tt_cmap2_char_next): Adjust condition to avoid
+ an endless loop.
+
2018-04-19 Werner Lemberg <[email protected]
[autofit] Add support for Georgian Mtavruli characters.
@@ -9,7 +22,7 @@
* src/autofit/afscript.h: Add Mtavruli standard character.
-2018-03-13 Werner Lemberg <[email protected]>
+2018-04-18 Werner Lemberg <[email protected]>
Fix handling of invalid format 2 cmaps.
--- a/src/sfnt/ttcmap.c
+++ b/src/sfnt/ttcmap.c
@@ -518,7 +518,7 @@
FT_UInt pos, idx;
- if ( char_lo > start + count )
+ if ( char_lo > start + count && charcode <= 0xFF )
{
/* this happens only for a malformed cmap */
charcode = 0x100;