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:
Axel Dörfler 2006-05-25 13:03:13 +00:00
parent 3df4580e9a
commit 20914efdcf

View File

@ -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;