Fix segfault when consuming zero-length caches in fc-cat (which has no
config, so FcConfigAddFontDir shouldn't be called.)
This commit is contained in:
parent
8a0b0ed6d0
commit
eadadf489a
|
@ -1,3 +1,9 @@
|
|||
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,6 +978,7 @@ FcDirCacheConsume (int fd, const char * dir, FcFontSet *set, FcConfig *config)
|
|||
{
|
||||
pos = FcCacheNextOffset (lseek(fd, 0, SEEK_CUR));
|
||||
lseek (fd, pos, SEEK_SET);
|
||||
if (config)
|
||||
FcConfigAddFontDir (config, (FcChar8 *)dir);
|
||||
return FcTrue;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue