Commit 0f0a6bb8aaae07c4105ac4d6ee26fd8eda946b3e

Werner Lemberg 2015-11-05T13:48:11

[sfnt] Ignore embedded bitmaps with zero size (#46379). * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bit_aligned): Implement it.

diff --git a/ChangeLog b/ChangeLog
index 558a669..cc8ba89 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2015-11-05  Werner Lemberg  <wl@gnu.org>
+
+	[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  <wl@gnu.org>
 
 	[truetype] Catch infinite recursion in subglyphs (#46372).
diff --git a/src/sfnt/ttsbit.c b/src/sfnt/ttsbit.c
index acc18f0..62bce3c 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 */