From 43d587d89bee679850bb18ff25aa77c961712728 Mon Sep 17 00:00:00 2001 From: Olli Vertanen Date: Tue, 6 Sep 2011 19:00:55 +0000 Subject: libxfont: An uninitialized pointer causes a crash if pcf header is corrupted. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Rami Ylimäki --- src/bitmap/pcfread.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/bitmap/pcfread.c') diff --git a/src/bitmap/pcfread.c b/src/bitmap/pcfread.c index 92b6348..cf2f696 100644 --- a/src/bitmap/pcfread.c +++ b/src/bitmap/pcfread.c @@ -407,6 +407,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; -- cgit v1.2.3