Re: Re: patch to fix endless loop in fc-cache

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Mike FABIAN wrote:
> Mike FABIAN <mfabian@xxxxxxx> さんは書きました:
> 
> 
>>by Takashi Iwai <tiwai@xxxxxxx>.
>>
>>fc-cache did loop endless if a subdirectory was a symlink
>>pointing to a directory higher up, e.g.
>>ln -s /usr/share/fonts /usr/share/fonts/ttt
> 
> 
> In addition to that patch for "fc-cache.c", another, similar patch
> is also necessary for "fccache.c", otherwise applications using
> fontconfig will still loop.

The call to FcStrSetMember in FcCacheReadDirs is unneeded (here and
elsewhere), because FcStrSetAdd calls _FcStrSetAppend, which starts with:

    if (FcStrSetMember (set, s))
    {
        FcStrFree (s);
        return FcTrue;
    }

Also it would be good to avoid having this difficult-to-understand
global processed_dirs variable.  I'd much rather have it be passed to
FcCacheReadDirs.  Once I review Takashi's first patch (hopefully later
today) I'll commit a modified version of this patch.

pat
_______________________________________________
Fontconfig mailing list
Fontconfig@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/fontconfig

[Index of Archives]     [Fedora Fonts]     [Fedora Users]     [Fedora Cloud]     [Kernel]     [Fedora Packaging]     [Fedora Desktop]     [PAM]     [Gimp Graphics Editor]     [Yosemite News]

  Powered by Linux