+2006-02-09 Patrick Lam <plam@mit.edu>
+ * src/fccache.c (FcDirCacheValid, FcDirCacheWrite):
+
+ Fix attempt to close -1.
+ Don't unboundedly grow bad caches (reported by fcrozat).
+
2006-02-09 Patrick Lam <plam@mit.edu>
* src/fccharset.c (FcCharSetNeededBytes, FcCharSetSerialize,
FcCharSetGetLeaf):
fd = FcDirCacheOpen (dir);
if (fd < 0)
- goto bail;
+ return FcFalse;
if (fstat (fd, &file_stat) < 0)
goto bail;
if(!FcCacheReadString (fd, name_buf, sizeof (name_buf)) || !strlen(name_buf))
{
close (fd);
- break;
+ continue;
}
close (fd);
if (strcmp (name_buf, cache_file) != 0)
continue;
- } while (0);
+
+ break;
+ } while (1);
current_dir_block = FcDirCacheProduce (set, &metadata);