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 <mwinter@opensourcerouting.org>
This commit is contained in:
Martin Winter 2017-02-03 23:05:11 +07:00
parent b3411578b0
commit 9cbad1d7c4

View File

@ -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);