svn commit: r223222 - head/usr.bin/users
Ed Schouten
ed at FreeBSD.org
Sat Jun 18 07:47:16 UTC 2011
Author: ed
Date: Sat Jun 18 07:47:15 2011
New Revision: 223222
URL: http://svn.freebsd.org/changeset/base/223222
Log:
Let the size of the namebuf depend on the size of the ut_user field.
Modified:
head/usr.bin/users/users.c
Modified: head/usr.bin/users/users.c
==============================================================================
--- head/usr.bin/users/users.c Sat Jun 18 05:13:48 2011 (r223221)
+++ head/usr.bin/users/users.c Sat Jun 18 07:47:15 2011 (r223222)
@@ -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);
More information about the svn-src-head
mailing list