[Fontconfig] patch: destroy ~/.fonts.cache-2 if it doesn't start with FC_GLOBAL_MAGIC_COOKIE or no string can be read at all from that file.

Mike FABIAN mfabian at suse.de
Mon Jan 30 11:44:19 PST 2006


A colleague again had a problem with a apparently broken
~/.fonts.cache-2 file. The file is here:

http://lisa.goe.net/~mfabian/.fonts.cache-2-T42p-JP

The file is huge (78 Megabytes) and apparently broken, as it doesn't
start with FC_GLOBAL_MAGIC_COOKIE.

When calling

    fc-match sans

this took a lot of time *always* the broken file was never fixed.
Actually it grew bigger and bigger all the time.

I believe if FcGlobalCacheLoad () cannot read any string at all from
~/.fonts.cache-2 or if the file does not start with
FC_GLOBAL_MAGIC_COOKIE it should exit with "goto bail_and_destroy;" to
delete the broken file instead of just "return;".

-------------- next part --------------
A non-text attachment was scrubbed...
Name: destroy-completely-broken-cache-files-in-home-directory.patch
Type: text/x-patch
Size: 632 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/fontconfig/attachments/20060130/6ca4f7fe/destroy-completely-broken-cache-files-in-home-directory.bin
-------------- next part --------------

-- 
Mike FABIAN   <mfabian at suse.de>   http://www.suse.de/~mfabian
?????????????


More information about the Fontconfig mailing list