An empty element would cause every file starting with the current
directory to be scanned, probably not what the user wanted.
strcat (data, "fonts");
}
#endif
- if (!FcStrUsesHome (data) || FcConfigHome ())
+ if (strlen ((char *) data) == 0)
+ FcConfigMessage (parse, FcSevereWarning, "empty font directory name ignored");
+ else if (!FcStrUsesHome (data) || FcConfigHome ())
{
if (!FcConfigAddDir (parse->config, data))
FcConfigMessage (parse, FcSevereError, "out of memory; cannot add directory %s", data);