From: Martin Winter Date: Fri, 3 Feb 2017 16:05:11 +0000 (+0700) Subject: ospfd: CID 1399387 (#1 of 2): Destination buffer too small (STRING_OVERFLOW) X-Git-Tag: frr-2.0-rc2~5^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=9cbad1d7c462035d3e561347f6f62d85b1a8f33a;p=mirror%2Ffrr.git 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 --- diff --git a/ospfd/ospf_main.c b/ospfd/ospf_main.c index cc335a8abd..edb1ca470e 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);