diff --git a/pimd/pim_assert.c b/pimd/pim_assert.c index ca21786aea..29a241b277 100644 --- a/pimd/pim_assert.c +++ b/pimd/pim_assert.c @@ -241,6 +241,7 @@ int pim_assert_recv(struct interface *ifp, /* Parse assert group addr */ + memset (&sg, 0, sizeof (struct prefix_sg)); offset = pim_parse_addr_group (&sg, curr, curr_size); if (offset < 1) { char src_str[INET_ADDRSTRLEN]; diff --git a/pimd/pim_join.c b/pimd/pim_join.c index 8ef2cada87..53c91ab4af 100644 --- a/pimd/pim_join.c +++ b/pimd/pim_join.c @@ -293,6 +293,7 @@ int pim_joinprune_recv(struct interface *ifp, uint16_t msg_num_pruned_sources; int source; + memset (&sg, 0, sizeof (struct prefix_sg)); addr_offset = pim_parse_addr_group (&sg, buf, pastend - buf); if (addr_offset < 1) { diff --git a/pimd/pim_register.c b/pimd/pim_register.c index 229232fde4..e012115e37 100644 --- a/pimd/pim_register.c +++ b/pimd/pim_register.c @@ -105,11 +105,11 @@ pim_register_stop_recv (uint8_t *buf, int buf_size) struct prefix_sg sg; int l; + memset (&sg, 0, sizeof (struct prefix_sg)); l = pim_parse_addr_group (&sg, buf, buf_size); buf += l; buf_size -= l; pim_parse_addr_ucast (&source, buf, buf_size); - memset (&sg, 0, sizeof (struct prefix_sg)); sg.src = source.u.prefix4; if (PIM_DEBUG_PIM_REG)