mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-13 01:38:05 +00:00
pimd: strncpy -> strlcpy
strncpy is a byte copy function not a string copy function Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
This commit is contained in:
parent
4d65d9278e
commit
81c077d096
@ -189,8 +189,8 @@ void pim_register_send(const uint8_t *buf, int buf_size, struct in_addr src,
|
|||||||
|
|
||||||
if (PIM_DEBUG_PIM_REG) {
|
if (PIM_DEBUG_PIM_REG) {
|
||||||
char rp_str[INET_ADDRSTRLEN];
|
char rp_str[INET_ADDRSTRLEN];
|
||||||
strncpy(rp_str, inet_ntoa(rpg->rpf_addr.u.prefix4),
|
strlcpy(rp_str, inet_ntoa(rpg->rpf_addr.u.prefix4),
|
||||||
INET_ADDRSTRLEN - 1);
|
sizeof(rp_str));
|
||||||
zlog_debug("%s: Sending %s %sRegister Packet to %s on %s",
|
zlog_debug("%s: Sending %s %sRegister Packet to %s on %s",
|
||||||
__PRETTY_FUNCTION__, up->sg_str,
|
__PRETTY_FUNCTION__, up->sg_str,
|
||||||
null_register ? "NULL " : "", rp_str, ifp->name);
|
null_register ? "NULL " : "", rp_str, ifp->name);
|
||||||
|
Loading…
Reference in New Issue
Block a user