Re: Crash when non-existing directories are referenced in ~/.fonts.cache

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

 



Patrick Lam <plam@xxxxxxx> さんは書きました:

> There's a bunch of related crashes that I'm trying to fix and will
> hopefully commit soon.  Please wait till after I commit them and we'll
> see which crashes remain.

As I have already a patch ready which fixes this, I'll attach
it here.

diff -ru fontconfig-2.3.93.20060125.orig/src/fccache.c fontconfig-2.3.93.20060125/src/fccache.c
--- fontconfig-2.3.93.20060125.orig/src/fccache.c	2006-01-25 16:02:45.000000000 +0100
+++ fontconfig-2.3.93.20060125/src/fccache.c	2006-01-26 16:54:55.000000000 +0100
@@ -304,7 +304,9 @@
     if (cache->fd == -1)
 	return FcFalse;
 
-    dir = (char *)FcConfigNormalizeFontDir (config, (FcChar8 *)dir);
+    if (!(dir = (char *)FcConfigNormalizeFontDir (config, (FcChar8 *)dir)))
+	return FcFalse; /* non-existing directory */
+    
     for (d = cache->dirs; d; d = d->next)
     {
 	if (strncmp (d->name, dir, strlen(dir)) == 0)
-- 
Mike FABIAN   <mfabian@xxxxxxx>   http://www.suse.de/~mfabian
睡眠不足はいい仕事の敵だ。
_______________________________________________
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