[MPlayer-dev-eng] [PATCH] Fix fontconfig crash when it can't find a config directory
Uoti Urpala
uoti.urpala at pp1.inet.fi
Wed Dec 16 22:38:57 CET 2009
On Wed, 2009-12-16 at 21:46 +0100, Adrian Stutz wrote:
> 2009/12/16 Frédéric L. W. Meunier <fredlwm at gmail.com>
>
> > I think your patch broke something. I have fontconfig (2.8.0) properly
> > installed, but get "Fontconfig failed to select a font. Trying without
> > fontconfig..." all the time on Linux.
> >
>
> Could you try with attached patch? And if it still doesn't work, post what
> gets printed just before the "Fontconfig failed to select a font." line.
The patch you applied looks suspicious by itself - the code obviously
did not _always_ crash without that patch, which means that either
fontconfig does not always write through the pointer or some of those
writes check against NULL but others don't. Given that, your change
certainly doesn't look safe.
Can you give the call a dummy pointer and check against the return value
being NULL instead? (To me it looks like this should be a more robust
check, but I didn't check the semantics carefully enough to be fully
certain it's correct.)
You also left invalid indentation in the file, you should fix that.
More information about the MPlayer-dev-eng
mailing list