mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-05-30 01:16:39 +00:00
bfdd: fix garbage "port" string
bfd_recv_ipv4() is getting an uninitialized buffer passed in as port, and then checks it without clearing it first. Thus we can end up leaving garbage data in it. Signed-off-by: David Lamparter <equinox@diac24.net>
This commit is contained in:
parent
4f4060f6ab
commit
e10cfdaf51
@ -248,6 +248,8 @@ ssize_t bfd_recv_ipv4(int sd, uint8_t *msgbuf, size_t msgbuflen, uint8_t *ttl,
|
|||||||
struct iovec iov[1];
|
struct iovec iov[1];
|
||||||
uint8_t cmsgbuf[255];
|
uint8_t cmsgbuf[255];
|
||||||
|
|
||||||
|
port[0] = '\0';
|
||||||
|
|
||||||
/* Prepare the recvmsg params. */
|
/* Prepare the recvmsg params. */
|
||||||
iov[0].iov_base = msgbuf;
|
iov[0].iov_base = msgbuf;
|
||||||
iov[0].iov_len = msgbuflen;
|
iov[0].iov_len = msgbuflen;
|
||||||
|
Loading…
Reference in New Issue
Block a user