diff options
author | ed <ed@FreeBSD.org> | 2011-06-18 07:47:15 +0000 |
---|---|---|
committer | ed <ed@FreeBSD.org> | 2011-06-18 07:47:15 +0000 |
commit | aa935a4b7dab53762a43775a83794a9c3e41b201 (patch) | |
tree | 45e23955b0ae20eae4eb6a30a0b2c9af06c46171 | |
parent | b191164fbfb4feb9fcee38fdcb1326a53aa1f05d (diff) | |
download | FreeBSD-src-aa935a4b7dab53762a43775a83794a9c3e41b201.zip FreeBSD-src-aa935a4b7dab53762a43775a83794a9c3e41b201.tar.gz |
Let the size of the namebuf depend on the size of the ut_user field.
-rw-r--r-- | usr.bin/users/users.c | 2 |
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); |