summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2011-06-18 07:47:15 +0000
committered <ed@FreeBSD.org>2011-06-18 07:47:15 +0000
commitaa935a4b7dab53762a43775a83794a9c3e41b201 (patch)
tree45e23955b0ae20eae4eb6a30a0b2c9af06c46171 /usr.bin
parentb191164fbfb4feb9fcee38fdcb1326a53aa1f05d (diff)
downloadFreeBSD-src-aa935a4b7dab53762a43775a83794a9c3e41b201.zip
FreeBSD-src-aa935a4b7dab53762a43775a83794a9c3e41b201.tar.gz
Let the size of the namebuf depend on the size of the ut_user field.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/users/users.c2
1 files changed, 1 insertions, 1 deletions
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 <unistd.h>
#include <utmpx.h>
-typedef char namebuf[MAXLOGNAME];
+typedef char namebuf[sizeof(((struct utmpx *)0)->ut_user) + 1];
int scmp(const void *, const void *);
static void usage(void);
OpenPOWER on IntegriCloud