summaryrefslogtreecommitdiff
path: root/libc/misc/utmp/utent.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc/misc/utmp/utent.c')
-rw-r--r--libc/misc/utmp/utent.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libc/misc/utmp/utent.c b/libc/misc/utmp/utent.c
index 3833742cc..186ee9927 100644
--- a/libc/misc/utmp/utent.c
+++ b/libc/misc/utmp/utent.c
@@ -138,7 +138,7 @@ struct utmp *getutid (const struct utmp *utmp_entry)
utmp_entry->ut_type == DEAD_PROCESS ||
utmp_entry->ut_type == LOGIN_PROCESS ||
utmp_entry->ut_type == USER_PROCESS) &&
- !strcmp(lutmp->ut_id, utmp_entry->ut_id))
+ !strncmp(lutmp->ut_id, utmp_entry->ut_id, sizeof(lutmp->ut_id)))
{
return lutmp;
}