Fixed the crashing bug in the VFS - we can't make any assumptions about
the "device" parameter of fs_mount. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1225 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -2898,9 +2898,12 @@ fs_mount(char *path, const char *device, const char *fsName, void *args, bool ke
|
||||
vnode_id root_id;
|
||||
int err = 0;
|
||||
|
||||
FUNCTION(("vfs_mount: entry. path = '%s', fs_name = '%s'\n", path, fsName));
|
||||
FUNCTION(("fs_mount: entry. path = '%s', fs_name = '%s'\n", path, fsName));
|
||||
|
||||
if (device[0] == '\0' || fsName[0] == '\0')
|
||||
// The path is always safe, we just have to make sure that fsName is
|
||||
// almost valid - we can't make any assumptions about device and args,
|
||||
// though.
|
||||
if (fsName == NULL || fsName[0] == '\0')
|
||||
return B_BAD_VALUE;
|
||||
|
||||
mutex_lock(&gMountOpMutex);
|
||||
|
||||
Reference in New Issue
Block a user