diff options
| author | Renato Westphal <renato@openbsd.org> | 2018-07-25 11:07:57 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-07-25 11:07:57 -0300 |
| commit | a095cabc6cc4167ebba85dcab4b8aaead56f72ab (patch) | |
| tree | fbcf7883fcd39e7ff8748ff8a2178c08d4c30715 | |
| parent | 4dbd617abd7de8f53a0fecb763b95704341450af (diff) | |
| parent | 431f21d38e6543f485f8e79178bcafa5a2013ee5 (diff) | |
Merge pull request #2712 from pacovn/Security_Uninitialized_memory_access
pimd: uninitialized memory access fix
| -rw-r--r-- | pimd/pim_nht.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/pimd/pim_nht.c b/pimd/pim_nht.c index 78152b266f..7d1940bec1 100644 --- a/pimd/pim_nht.c +++ b/pimd/pim_nht.c @@ -430,6 +430,9 @@ int pim_ecmp_nexthop_search(struct pim_instance *pim, if (!pnc || !pnc->nexthop_num || !nexthop) return 0; + memset(&nbrs, 0, sizeof(nbrs)); + memset(&ifps, 0, sizeof(ifps)); + // Current Nexthop is VALID, check to stay on the current path. if (nexthop->interface && nexthop->interface->info && nexthop->mrib_nexthop_addr.u.prefix4.s_addr @@ -829,6 +832,9 @@ int pim_ecmp_nexthop_lookup(struct pim_instance *pim, return 0; } + memset(&nbrs, 0, sizeof(nbrs)); + memset(&ifps, 0, sizeof(ifps)); + /* * Look up all interfaces and neighbors, * store for later usage |
