Fix the error buffer passed to kvm_openfiles to have a correct length
of _POSIX2_LINE_MAX. MFC after: 1 week
This commit is contained in:
parent
544e355013
commit
af943f55f7
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=77212
@ -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');
|
||||
|
Loading…
Reference in New Issue
Block a user