From 48765f90e3130d772908e0166fcd496b6b3637d6 Mon Sep 17 00:00:00 2001 From: ache Date: Mon, 14 Nov 1994 20:26:52 +0000 Subject: strncmp use wrong utmp name size Submitted by: rlz@zeus.id.net --- usr.sbin/ac/ac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'usr.sbin/ac/ac.c') diff --git a/usr.sbin/ac/ac.c b/usr.sbin/ac/ac.c index 2d68315..bf98701 100644 --- a/usr.sbin/ac/ac.c +++ b/usr.sbin/ac/ac.c @@ -14,7 +14,7 @@ */ #ifndef lint -static char rcsid[] = "$Id: ac.c,v 1.1.1.1 1994/05/18 08:00:45 csgr Exp $"; +static char rcsid[] = "$Id: ac.c,v 1.1 1994/09/26 22:12:27 davidg Exp $"; #endif #include @@ -195,7 +195,7 @@ update_user(head, name, secs) struct user_list *up; for (up = head; up != NULL; up = up->next) { - if (strncmp(up->name, name, sizeof (up->name)) == 0) { + if (strncmp(up->name, name, UT_NAMESIZE) == 0) { up->secs += secs; Total += secs; return head; -- cgit v1.1