Fix off by one error in index limit calculation
Reported by: Coverity CID: 1193826
This commit is contained in:
parent
1b6b612801
commit
32ff5d5154
@ -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…
Reference in New Issue
Block a user