Commit eadadf48 authored by Patrick Lam's avatar Patrick Lam
Browse files

Fix segfault when consuming zero-length caches in fc-cat (which has no

    config, so FcConfigAddFontDir shouldn't be called.)
parent 8a0b0ed6
2006-01-14 Patirck Lam <plam@mit.edu>
* src/fccache.c (FcDirCacheConsume):
Fix segfault when consuming zero-length caches in fc-cat
(which has no config, so FcConfigAddFontDir shouldn't be called.)
2006-01-14 Patrick Lam <plam@mit.edu>
* fc-cache/fc-cache.c (scanDirs):
* fontconfig/fontconfig.h:
......
......@@ -978,7 +978,8 @@ FcDirCacheConsume (int fd, const char * dir, FcFontSet *set, FcConfig *config)
{
pos = FcCacheNextOffset (lseek(fd, 0, SEEK_CUR));
lseek (fd, pos, SEEK_SET);
FcConfigAddFontDir (config, (FcChar8 *)dir);
if (config)
FcConfigAddFontDir (config, (FcChar8 *)dir);
return FcTrue;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment