[PATCH] libxfont: An uninitialized pointer causes a crash if pcf header is corrupted.
Rami Ylimäki
rami.ylimaki at vincit.fi
Fri Sep 9 01:58:50 PDT 2011
On 09/06/2011 02:00 PM, Olli Vertanen wrote:
> 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;
>
Reviewed-by: Rami Ylimäki <rami.ylimaki at vincit.fi>
More information about the xorg-devel
mailing list