Fix off by one error in index limit calculation
Reported by: Coverity CID: 1193826
This commit is contained in:
parent
9c3e205296
commit
41cee4e41b
@ -53,7 +53,7 @@ bsdstat_setfmt(struct bsdstat *sf, const char *fmt0)
|
||||
"skipped\n", sf->name, tok);
|
||||
continue;
|
||||
}
|
||||
if (j+3 > (int) sizeof(sf->fmts)) {
|
||||
if (j+4 > (int) sizeof(sf->fmts)) {
|
||||
fprintf(stderr, "%s: not enough room for all stats; "
|
||||
"stopped at %s\n", sf->name, tok);
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user