From aa935a4b7dab53762a43775a83794a9c3e41b201 Mon Sep 17 00:00:00 2001 From: ed Date: Sat, 18 Jun 2011 07:47:15 +0000 Subject: Let the size of the namebuf depend on the size of the ut_user field. --- usr.bin/users/users.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'usr.bin') diff --git a/usr.bin/users/users.c b/usr.bin/users/users.c index f83a592..c13cc37 100644 --- a/usr.bin/users/users.c +++ b/usr.bin/users/users.c @@ -50,7 +50,7 @@ static const char rcsid[] = #include #include -typedef char namebuf[MAXLOGNAME]; +typedef char namebuf[sizeof(((struct utmpx *)0)->ut_user) + 1]; int scmp(const void *, const void *); static void usage(void); -- cgit v1.1