roken: getuserinfo WIN32 fix username string termination
95eb83c424
("roken: Add roken_get_username() and friends")
failed to copy the username C-String NUL terminator. As a result
a "DOMAIN\user" is returned as "userIN\user".
Change-Id: I10027e4eef18364074eecf385fa9fab1ae68dbe7
This commit is contained in:
@@ -230,7 +230,7 @@ roken_get_username(char *user, size_t usersz)
|
||||
p = strchr(user, '\\');
|
||||
if (p != NULL) {
|
||||
p++;
|
||||
memmove(user, p, strlen(p));
|
||||
memmove(user, p, strlen(p) + 1);
|
||||
}
|
||||
return user;
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user