FcDirCacheHasCurrentArch after FcDirCacheValid).
2006-02-18 Patrick Lam <plam@mit.edu>
+ * fc-cache/fc-cache.c (scanDirs):
+ * src/fccache.c (FcCacheReadDirs):
+ * src/fcdir.c (FcDirScanConfig):
+
+ Fix the underlying cause of the below segfault (must usually
+ call FcDirCacheHasCurrentArch after FcDirCacheValid).
+
+2006-02-18 Patrick Lam <plam@mit.edu>
* src/fccache.c (FcDirCacheHasCurrentArch):
- Fix segfault (reported by fcrozat) caused by incorrect
- input on cache files.
+ Fix triggering of segfault caused by misreading cache files
+ (reported by fcrozat).
2006-02-17 Patrick Lam <plam@mit.edu>
* src/fcint.h (FC_CACHE_MAGIC):
printf ("caching, %d fonts, %d dirs\n",
set->nfont, nsubdirs (subdirs));
+ /* This is the only reason we can't combine
+ * Valid w/HasCurrentArch... */
if (!FcDirCacheValid (dir))
if (!FcDirCacheUnlink (dir, config))
ret++;
FcStrSetDestroy (subdirs);
continue;
}
- if (FcDirCacheValid (dir) && FcDirCacheRead (set, subdirs, dir, config))
+ if (FcDirCacheValid (dir) &&
+ FcDirCacheHasCurrentArch (dir) &&
+ FcDirCacheRead (set, subdirs, dir, config))
{
/* if an old entry is found in the global cache, disable it */
if ((d = FcGlobalCacheDirFind (cache, (const char *)dir)) != NULL)
if (cache && FcGlobalCacheReadDir (set, dirs, cache, (char *)dir, config))
return FcTrue;
- if (FcDirCacheValid (dir) && FcDirCacheRead (set, dirs, dir, config))
+ if (FcDirCacheValid (dir) &&
+ FcDirCacheHasCurrentArch (dir) &&
+ FcDirCacheRead (set, dirs, dir, config))
return FcTrue;
}