diff options
| author | Jafar Al-Gharaibeh <Jafaral@users.noreply.github.com> | 2018-06-29 10:48:33 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-06-29 10:48:33 -0500 |
| commit | 5b03d030d9c8f55460c0b22a58bea40fd00171dc (patch) | |
| tree | 3d1c93352ca0fff6172286e4487ef221c5ccc39b /ospf6d/ospf6_intra.c | |
| parent | 798ad23151206358adb28bb210e651d6317d45ed (diff) | |
| parent | b8ce0c369622b5aeeef35a5ab4028d458bff4c92 (diff) | |
Merge pull request #2562 from pacovn/Coverity_1221444_1221446_Out-of-bounds_read
ospf6d: OoB read (Coverity 1221444 1221446)
Diffstat (limited to 'ospf6d/ospf6_intra.c')
| -rw-r--r-- | ospf6d/ospf6_intra.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ospf6d/ospf6_intra.c b/ospf6d/ospf6_intra.c index 7898b10905..0ce08a61e2 100644 --- a/ospf6d/ospf6_intra.c +++ b/ospf6d/ospf6_intra.c @@ -1700,7 +1700,8 @@ void ospf6_intra_prefix_lsa_add(struct ospf6_lsa *lsa) memset(&route->prefix, 0, sizeof(struct prefix)); route->prefix.family = AF_INET6; route->prefix.prefixlen = op->prefix_length; - ospf6_prefix_in6_addr(&route->prefix.u.prefix6, op); + ospf6_prefix_in6_addr(&route->prefix.u.prefix6, + intra_prefix_lsa, op); route->type = OSPF6_DEST_TYPE_NETWORK; route->path.origin.type = lsa->header->type; @@ -1882,7 +1883,7 @@ void ospf6_intra_prefix_lsa_remove(struct ospf6_lsa *lsa) memset(&prefix, 0, sizeof(struct prefix)); prefix.family = AF_INET6; prefix.prefixlen = op->prefix_length; - ospf6_prefix_in6_addr(&prefix.u.prefix6, op); + ospf6_prefix_in6_addr(&prefix.u.prefix6, intra_prefix_lsa, op); route = ospf6_route_lookup(&prefix, oa->route_table); if (route == NULL) |
