diff --git a/ChangeLog b/ChangeLog index 80b0b2f1d..fb612da98 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2015-11-03 Werner Lemberg + + [sfnt] Protect against zero-size bitmaps (#46345). + + * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap): Check + `glyph_size'. + 2015-11-02 Nikolaus Waxweiler * src/autofit/afloader.c (af_loader_load_g): Implement emboldening. diff --git a/src/sfnt/ttsbit.c b/src/sfnt/ttsbit.c index c0540f356..acc18f01b 100644 --- a/src/sfnt/ttsbit.c +++ b/src/sfnt/ttsbit.c @@ -1025,7 +1025,8 @@ /* seek into the EBDT table now */ - if ( glyph_start + glyph_size > decoder->ebdt_size ) + if ( !glyph_size || + glyph_start + glyph_size > decoder->ebdt_size ) { error = FT_THROW( Invalid_Argument ); goto Exit;