diff --git a/ChangeLog b/ChangeLog index 5942a16ce..74351bcd4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2017-12-31 Werner Lemberg + + * src/sfnt/ttcmap.c (tt_cmap2_char_next): Fix endless loop. + + Reported as + + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=4838 + 2017-12-31 Werner Lemberg Synchronize other Windows project files. diff --git a/src/sfnt/ttcmap.c b/src/sfnt/ttcmap.c index f6c02f907..45414d1ae 100644 --- a/src/sfnt/ttcmap.c +++ b/src/sfnt/ttcmap.c @@ -518,7 +518,11 @@ if ( offset == 0 ) + { + if ( charcode == 0x100 ) + goto Exit; /* this happens only for a malformed cmap */ goto Next_SubHeader; + } if ( char_lo < start ) {