diff options
author | Renato Westphal <renato@opensourcerouting.org> | 2019-01-04 22:08:09 +0100 |
---|---|---|
committer | Renato Westphal <renato@opensourcerouting.org> | 2019-01-18 19:15:41 +0100 |
commit | 2ae9e38fa7d1a29ba39875b28f0135335c0e2329 (patch) | |
tree | 86018baebe6e4941f80001e7457dbcaab4315640 /ripngd | |
parent | ripd, ripngd: fix null pointer dereference in YANG RPCs (diff) | |
download | frr-2ae9e38fa7d1a29ba39875b28f0135335c0e2329.tar.xz frr-2ae9e38fa7d1a29ba39875b28f0135335c0e2329.zip |
ripngd: fix valgrind warning about uninitialized memory usage
Fixes the following warning when running ripngd with valgrind:
==38== Syscall param sendmsg(msg.msg_control) points to uninitialised
byte(s)
==38== at 0x5EA1E47: sendmsg (sendmsg.c:28)
==38== by 0x118C48: ripng_send_packet (ripngd.c:226)
==38== by 0x11D1D6: ripng_request (ripngd.c:1924)
==38== by 0x120BD8: ripng_interface_wakeup (ripng_interface.c:666)
==38== by 0x4ECB4B4: thread_call (thread.c:1601)
==38== by 0x4E8D9CE: frr_run (libfrr.c:1011)
==38== by 0x1121C8: main (ripng_main.c:180)
==38== Address 0xffefffc34 is on thread 1's stack
==38== in frame #1, created by ripng_send_packet (ripngd.c:172)
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'ripngd')
-rw-r--r-- | ripngd/ripngd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ripngd/ripngd.c b/ripngd/ripngd.c index ae8e8ab7d..03383bc26 100644 --- a/ripngd/ripngd.c +++ b/ripngd/ripngd.c @@ -152,7 +152,7 @@ int ripng_send_packet(caddr_t buf, int bufsize, struct sockaddr_in6 *to, struct msghdr msg; struct iovec iov; struct cmsghdr *cmsgptr; - char adata[256]; + char adata[256] = {}; struct in6_pktinfo *pkt; struct sockaddr_in6 addr; |