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); _______________________________________________ [email protected] mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "[email protected]"
