Made _user_open_entry_ref() a bit more relaxed and return B_BAD_VALUE on some
obvious errors. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17586 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
3df4580e9a
commit
20914efdcf
@ -6682,6 +6682,8 @@ _user_open_entry_ref(dev_t device, ino_t inode, const char *userName,
|
||||
{
|
||||
char name[B_FILE_NAME_LENGTH];
|
||||
|
||||
if (userName == NULL || device < 0 || inode < 0)
|
||||
return B_BAD_VALUE;
|
||||
if (!IS_USER_ADDRESS(userName)
|
||||
|| user_strlcpy(name, userName, sizeof(name)) < B_OK)
|
||||
return B_BAD_ADDRESS;
|
||||
|
Loading…
Reference in New Issue
Block a user