mirror of
https://github.com/troglobit/libite.git
synced 2026-10-19 10:59:32 +00:00
Fix fisdir sigfault on Hurd
Apparently Hurd's stat() does not like NULL and will sigfault, this patch takes care of it.
This commit is contained in:
1 parent
8120492fc8
commit
0cda6339a4
1 file changed
+1
-1
+1
-1
@@ -41,7 +41,7 @@ int fisdir(const char *path)
|
||||
{
|
||||
struct stat sb;
|
||||
|
||||
if (!stat(path, &sb) && S_ISDIR(sb.st_mode))
|
||||
if (path && !stat(path, &sb) && S_ISDIR(sb.st_mode))
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in new issue
Block a user