Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion subsys/fs/fuse_fs_access.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,15 @@ static void release_file_handle(size_t handle)
static bool is_mount_point(const char *path)
{
char dir_path[PATH_MAX];
size_t len;

sprintf(dir_path, "%s", path);
len = strlen(path);
if (len >= sizeof(dir_path)) {
return false;
}

memcpy(dir_path, path, len);
dir_path[len] = '\0';
return strcmp(dirname(dir_path), "/") == 0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some day I will fix this atrocity.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

}

Expand Down