[PATCH] libxfont: An uninitialized pointer causes a crash if pcf header is corrupted.

Olli Vertanen olli.vertanen at symbio.com
Tue Sep 6 04:00:55 PDT 2011


If pcfReadTOC() or pcfGetProperties() fail in the beginning
of execution of pcfReadFont(), function tries to free an
uninitialized pointer (isStringProp) when bailing out.

The pointer gets now initialized correctly.

Signed-off-by: Olli Vertanen <olli.vertanen at symbio.com>
---
 src/bitmap/pcfread.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/bitmap/pcfread.c b/src/bitmap/pcfread.c
index 182144a..de4e93d 100644
--- a/src/bitmap/pcfread.c
+++ b/src/bitmap/pcfread.c
@@ -408,6 +408,8 @@ pcfReadFont(FontPtr pFont, FontFilePtr file,
 
     pFont->info.nprops = 0;
     pFont->info.props = 0;
+    pFont->info.isStringProp=0;
+
     if (!(tables = pcfReadTOC(file, &ntables)))
 	goto Bail;
 
-- 
1.7.1



More information about the xorg-devel mailing list