[MPlayer-dev-eng] [PATCH] Fix fontconfig crash when it can't find a config directory

Adrian Stutz adrian at sttz.ch
Tue Dec 15 20:43:03 CET 2009


Hello,

FcFontMatch in font_load_ft.c expects its third argument to be a pointer and
tries to assign it a result value when an error occurs. Current code passes
0 to the function, which leads to a crash if no font can be matched. This is
the case if no fontconfig config directory (and therefore no fonts) can be
found on the system.

This patch passes a proper pointer to the function, checks if it fails and
falls back to the non-fontconfig behavior in that case.

Greetings
Adrian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fontconfig_crash.diff
Type: application/octet-stream
Size: 1796 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20091215/03cdb8bd/attachment.obj>


More information about the MPlayer-dev-eng mailing list