From 32ff5d515469718aaf8c9765b22a7e47dffc8578 Mon Sep 17 00:00:00 2001 From: truckman Date: Mon, 16 May 2016 15:42:59 +0000 Subject: [PATCH] Fix off by one error in index limit calculation Reported by: Coverity CID: 1193826 --- lib/libbsdstat/bsdstat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libbsdstat/bsdstat.c b/lib/libbsdstat/bsdstat.c index 96fba009ba5e..564020eee56a 100644 --- a/lib/libbsdstat/bsdstat.c +++ b/lib/libbsdstat/bsdstat.c @@ -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;