summaryrefslogtreecommitdiff
path: root/src/bitmap/pcfread.c
diff options
context:
space:
mode:
authorOlli Vertanen <olli.vertanen@symbio.com>2011-09-06 19:00:55 +0000
committerMatthieu Herrb <matthieu.herrb@laas.fr>2011-09-18 13:11:17 +0200
commit43d587d89bee679850bb18ff25aa77c961712728 (patch)
treea8d8ef84df9cfe80f608dd2909ad993389be78ac /src/bitmap/pcfread.c
parent73e6c94a351c891ed85446df84c9a30a4224f478 (diff)
libxfont: An uninitialized pointer causes a crash if pcf header is corrupted.
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@symbio.com> Reviewed-by: Rami Ylimäki <rami.ylimaki@vincit.fi>
Diffstat (limited to 'src/bitmap/pcfread.c')
-rw-r--r--src/bitmap/pcfread.c2
1 files changed, 2 insertions, 0 deletions
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;