From 19fee12a135be1e14a7dc11e05c4264212487329 Mon Sep 17 00:00:00 2001 From: Martin Winter Date: Fri, 3 Feb 2017 23:05:11 +0700 Subject: [PATCH] ospfd: CID 1399387 (#1 of 2): Destination buffer too small (STRING_OVERFLOW) Coverity: string_overflow: You might overrun the 100-character destination string vty_path by writing 4096 characters from vty_sock_path. Signed-off-by: Martin Winter --- ospfd/ospf_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ospfd/ospf_main.c b/ospfd/ospf_main.c index cc335a8abde9..edb1ca470e71 100644 --- a/ospfd/ospf_main.c +++ b/ospfd/ospf_main.c @@ -407,7 +407,7 @@ main (int argc, char **argv) } else { - strcpy(vty_path, vty_sock_path); + strlcpy(vty_path, vty_sock_path, sizeof(vty_path)); } vty_serv_sock (vty_addr, vty_port, vty_path);