From c3f1b3ae094280da4c19a318cd5c7e56edf4fac2 Mon Sep 17 00:00:00 2001 From: Ed Schouten Date: Sat, 18 Jun 2011 07:47:15 +0000 Subject: [PATCH] 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(-) diff --git a/usr.bin/users/users.c b/usr.bin/users/users.c index f83a592ccf7..c13cc37eeda 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);