Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 18 Jun 2011 07:47:15 +0000 (UTC)
From:      Ed Schouten <ed@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r223222 - head/usr.bin/users
Message-ID:  <201106180747.p5I7lFsQ027798@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201106180747.p5I7lFsQ027798>