summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ac
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>1997-08-30 19:54:45 +0000
committerderaadt <deraadt@openbsd.org>1997-08-30 19:54:45 +0000
commit65ed1f83be244d5b6ee1e4af036d9c55f40aeea8 (patch)
tree0342d8306ff73b2c6cf62c43449e575d4a488912 /usr.sbin/ac
parentdefault term type is vt220 (diff)
downloadwireguard-openbsd-65ed1f83be244d5b6ee1e4af036d9c55f40aeea8.tar.xz
wireguard-openbsd-65ed1f83be244d5b6ee1e4af036d9c55f40aeea8.zip
incorrect length in comparison; hubert.feyrer@rz.uni-regensburg.de
Diffstat (limited to 'usr.sbin/ac')
-rw-r--r--usr.sbin/ac/ac.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/ac/ac.c b/usr.sbin/ac/ac.c
index 03ccd8100d6..82fc8e4a6e8 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.5 1997/08/01 07:33:57 deraadt Exp $";
+static char rcsid[] = "$Id: ac.c,v 1.6 1997/08/30 19:54:45 deraadt Exp $";
#endif
#include <sys/types.h>
@@ -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, sizeof (up->name) - 1) == 0) {
up->secs += secs;
Total += secs;
return head;