diff options
author | tmm <tmm@FreeBSD.org> | 2001-05-26 00:02:13 +0000 |
---|---|---|
committer | tmm <tmm@FreeBSD.org> | 2001-05-26 00:02:13 +0000 |
commit | 420a2e019f6a32ef5bff16a71eb8ec2064844d06 (patch) | |
tree | 4599f8feccdc4dca260a8bff9eb3231beba71e8b /usr.bin/w/w.c | |
parent | 8cf894ccc709a3adc02101877f22df01c46d9d7a (diff) | |
download | FreeBSD-src-420a2e019f6a32ef5bff16a71eb8ec2064844d06.zip FreeBSD-src-420a2e019f6a32ef5bff16a71eb8ec2064844d06.tar.gz |
Fix the error buffer passed to kvm_openfiles to have a correct length
of _POSIX2_LINE_MAX.
MFC after: 1 week
Diffstat (limited to 'usr.bin/w/w.c')
-rw-r--r-- | usr.bin/w/w.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/w/w.c b/usr.bin/w/w.c index 6ef6ad9..ef4030e 100644 --- a/usr.bin/w/w.c +++ b/usr.bin/w/w.c @@ -72,6 +72,7 @@ static const char rcsid[] = #include <fcntl.h> #include <kvm.h> #include <langinfo.h> +#include <limits.h> #include <locale.h> #include <netdb.h> #include <nlist.h> @@ -141,7 +142,7 @@ main(argc, argv) time_t touched; int ch, i, nentries, nusers, wcmd, longidle, dropgid; char *memf, *nlistf, *p, *x; - char buf[MAXHOSTNAMELEN], errbuf[256]; + char buf[MAXHOSTNAMELEN], errbuf[_POSIX2_LINE_MAX]; (void)setlocale(LC_ALL, ""); use_ampm = (*nl_langinfo(T_FMT_AMPM) != '\0'); |