[Fontconfig] Patch: avoid crashes is config files contain junk

Mike FABIAN mfabian at suse.de
Wed Feb 21 09:11:58 PST 2007


If ~/.fonts.conf contains:

  <edit mode="assign_replace" name="spacing">
   <int>mono</int>
  </edit>


fontconfig crashes:

    mfabian at magellan:~$ fc-match sans
    Fontconfig error: "~/.fonts.conf", line 46: "mono": not a valid integer
    セグメンテーション違反です (core dumped)
    mfabian at magellan:~$

Of course the above is nonsense, “mono” is no valid integer indeed.

But I think nevertheless fontconfig should not crash in that case.

A patch is attached. 

-- 
Mike FABIAN   <mfabian at suse.de>   http://www.suse.de/~mfabian
睡眠不足はいい仕事の敵だ。
I � Unicode

-------------- next part --------------
A non-text attachment was scrubbed...
Name: bugzilla-246783-do-not-crash-when-config-files-contain-broken-stuff.patch
Type: text/x-patch
Size: 374 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/fontconfig/attachments/20070221/372ca6d1/bugzilla-246783-do-not-crash-when-config-files-contain-broken-stuff.bin


More information about the Fontconfig mailing list