File u_libxfont_bdfreadcharacters_bailout_if_a_char_s_bitmap_cannot_be_read.patch of Package libXfont.1655

Subject: bdfReadCharacters: bailout if a char's bitmap cannot be read
References: bnc#921978, CVE-2015-1803
Signed-off-by: msrb@suse.com

 cannot be read [CVE-2015-BBBB]
---
 src/bitmap/bdfread.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
--- a/src/bitmap/bdfread.c	
+++ a/src/bitmap/bdfread.c	
@@ -458,7 +458,10 @@ bdfReadCharacters(FontFilePtr file, FontPtr pFont, bdfFileState *pState,
 	    ci->metrics.descent = -bb;
 	    ci->metrics.characterWidth = wx;
 	    ci->bits = NULL;
-	    bdfReadBitmap(ci, file, bit, byte, glyph, scan, bitmapsSizes);
+	    if (!bdfReadBitmap(ci, file, bit, byte, glyph, scan, bitmapsSizes)) {
+		bdfError("could not read bitmap for character '%s'\n", charName);
+		goto BAILOUT;
+	    }
 	    ci++;
 	    ndx++;
 	} else
--
openSUSE Build Service is sponsored by