Fixed _user_find_thread(NULL), courtesy of Jack Burton.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6939 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2004-03-09 15:45:34 +00:00
parent 805bba9456
commit 2f6684aaee
+3
View File
@@ -1698,6 +1698,9 @@ _user_find_thread(const char *userName)
{
char name[B_OS_NAME_LENGTH];
if (userName == NULL)
return find_thread(NULL);
if (!IS_USER_ADDRESS(userName)
|| user_strlcpy(name, userName, sizeof(name)) < B_OK)
return B_BAD_ADDRESS;