@ -17,7 +17,10 @@ char *mufs_abspath(const char *path)
{
char *s, *p, *next, *prev;
if (!(s = malloc(strlen(path) + 2)))
if (!path)
return "/";
if (!(s = calloc(strlen(path) + 2, sizeof *s)))
return NULL;
strcpy(s, path);