]> git.proxmox.com Git - mirror_frr.git/commit
ospfd: Prevent sending of uninited data to zebra
authorDonald Sharp <sharpd@nvidia.com>
Sat, 30 Jan 2021 19:13:34 +0000 (14:13 -0500)
committerDonald Sharp <sharpd@nvidia.com>
Sat, 30 Jan 2021 19:13:34 +0000 (14:13 -0500)
commitdd53fd0832e1e30b7d8289678d46e56f6ab2e7a3
tree89c85f120e12c78ad6699c1e257b168916c54e39
parentde8b27a6cc67e45cb55894c2eebba8ee21a780b6
ospfd: Prevent sending of uninited data to zebra

Valgrind reports:
2174600-==2174600==
2174600-==2174600== Syscall param write(buf) points to uninitialised byte(s)
2174600:==2174600==    at 0x49C7FB3: write (write.c:26)
2174600-==2174600==    by 0x48A4EA0: buffer_write (buffer.c:475)
2174600-==2174600==    by 0x4915AD9: zclient_send_message (zclient.c:298)
2174600-==2174600==    by 0x12DB97: ospf_ldp_sync_state_req_msg (ospf_ldp_sync.c:114)
2174600-==2174600==    by 0x12E4F0: ospf_ldp_sync_if_start (ospf_ldp_sync.c:160)
2174600-==2174600==    by 0x12E4F0: ospf_ldp_sync_ism_change (ospf_ldp_sync.c:339)
2174600-==2174600==    by 0x12E4F0: ospf_ldp_sync_ism_change (ospf_ldp_sync.c:332)
2174600-==2174600==    by 0x12C6A2: hook_call_ospf_ism_change (ospf_ism.c:46)
2174600-==2174600==    by 0x12C6A2: ism_change_state (ospf_ism.c:540)
2174600-==2174600==    by 0x12C6A2: ospf_ism_event (ospf_ism.c:600)
2174600-==2174600==    by 0x4904846: thread_call (thread.c:1681)

When we send the request structure we are sending the whole thing and the
interface name string has junk at the end.  Not a big deal, but cleans
up valgrind going wumple on us.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
ospfd/ospf_ldp_sync.c