top(1): increase size of 'status' buffer

This corrects a warning issues by gcc9:
/srv/src/freebsd/head/usr.bin/top/machine.c:988:22: warning: '%5zu'
directive writing between 5 and 20 bytes into a
 region of size 15 [-Wformat-overflow=]
     sprintf(status, "?%5zu", state);
This commit is contained in:
Eitan Adler 2018-05-22 07:56:58 +00:00
parent 2466d12b09
commit dbcdf411a1
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=334025

View File

@ -920,7 +920,7 @@ format_next_process(caddr_t xhandle, char *(*get_userid)(int), int flags)
long cputime;
double pct;
struct handle *hp;
char status[16];
char status[22];
int cpu;
size_t state;
struct rusage ru, *rup;