summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorF. Aragon <paco@voltanet.io>2018-09-07 11:20:45 +0200
committerF. Aragon <paco@voltanet.io>2018-09-07 11:20:45 +0200
commitaa1bac3039e800d7c972387c5cfb890b42592d29 (patch)
tree13e5d7f3853e30f7ff7578a1ba12324fdc852085
parentMerge pull request #2984 from donaldsharp/ak503_eigrp (diff)
downloadfrr-aa1bac3039e800d7c972387c5cfb890b42592d29.tar.xz
frr-aa1bac3039e800d7c972387c5cfb890b42592d29.zip
lib: array index check (Coverity 1473088)
Signed-off-by: F. Aragon <paco@voltanet.io>
-rw-r--r--lib/ferr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ferr.c b/lib/ferr.c
index 35d0fe4ff..fb5719d4d 100644
--- a/lib/ferr.c
+++ b/lib/ferr.c
@@ -148,7 +148,7 @@ void log_ref_display(struct vty *vty, uint32_t code, bool json)
snprintf(pbuf, sizeof(pbuf), "\nError %"PRIu32" - %s",
ref->code, ref->title);
memset(ubuf, '=', strlen(pbuf));
- ubuf[strlen(pbuf) - 1] = '\0';
+ ubuf[strlen(pbuf)] = '\0';
vty_out(vty, "%s\n%s\n", pbuf, ubuf);
vty_out(vty, "Description:\n%s\n\n", ref->description);