From 0f0a6bb8aaae07c4105ac4d6ee26fd8eda946b3e Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Thu, 5 Nov 2015 13:48:11 +0100 Subject: [PATCH] [sfnt] Ignore embedded bitmaps with zero size (#46379). * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bit_aligned): Implement it. --- ChangeLog | 7 +++++++ src/sfnt/ttsbit.c | 6 ++++++ 2 files changed, 13 insertions(+) diff --git a/ChangeLog b/ChangeLog index 558a6697f..cc8ba8908 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2015-11-05 Werner Lemberg + + [sfnt] Ignore embedded bitmaps with zero size (#46379). + + * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bit_aligned): Implement + it. + 2015-11-04 Werner Lemberg [truetype] Catch infinite recursion in subglyphs (#46372). diff --git a/src/sfnt/ttsbit.c b/src/sfnt/ttsbit.c index acc18f01b..62bce3c3d 100644 --- a/src/sfnt/ttsbit.c +++ b/src/sfnt/ttsbit.c @@ -808,6 +808,12 @@ goto Exit; } + if ( !line_bits || !height ) + { + /* nothing to do */ + goto Exit; + } + /* now do the blit */ /* adjust `line' to point to the first byte of the bitmap */