summaryrefslogtreecommitdiffstats
path: root/ospf6d/ospf6_abr.c
diff options
context:
space:
mode:
authorpaco <paco@voltanet.io>2018-06-27 11:47:57 +0200
committerF. Aragon <paco@voltanet.io>2018-06-29 10:39:27 +0200
commitb8ce0c369622b5aeeef35a5ab4028d458bff4c92 (patch)
treeb7f401cd43dbe8e59697a8b6be210cd68ad81b7d /ospf6d/ospf6_abr.c
parentMerge pull request #2556 from pacovn/Coverity_1465491_Untrusted_value_as_argu... (diff)
downloadfrr-b8ce0c369622b5aeeef35a5ab4028d458bff4c92.tar.xz
frr-b8ce0c369622b5aeeef35a5ab4028d458bff4c92.zip
ospf6d: OoB read (Coverity 1221444 1221446)
Signed-off-by: F. Aragon <paco@voltanet.io>
Diffstat (limited to 'ospf6d/ospf6_abr.c')
-rw-r--r--ospf6d/ospf6_abr.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ospf6d/ospf6_abr.c b/ospf6d/ospf6_abr.c
index b3aa3b21d..cef32bc43 100644
--- a/ospf6d/ospf6_abr.c
+++ b/ospf6d/ospf6_abr.c
@@ -864,7 +864,8 @@ void ospf6_abr_examin_summary(struct ospf6_lsa *lsa, struct ospf6_area *oa)
lsa->header);
prefix.family = AF_INET6;
prefix.prefixlen = prefix_lsa->prefix.prefix_length;
- ospf6_prefix_in6_addr(&prefix.u.prefix6, &prefix_lsa->prefix);
+ ospf6_prefix_in6_addr(&prefix.u.prefix6, prefix_lsa,
+ &prefix_lsa->prefix);
if (is_debug)
prefix2str(&prefix, buf, sizeof(buf));
table = oa->ospf6->route_table;
@@ -1284,7 +1285,7 @@ static char *ospf6_inter_area_prefix_lsa_get_prefix_str(struct ospf6_lsa *lsa,
(struct ospf6_inter_prefix_lsa *)OSPF6_LSA_HEADER_END(
lsa->header);
- ospf6_prefix_in6_addr(&in6, &prefix_lsa->prefix);
+ ospf6_prefix_in6_addr(&in6, prefix_lsa, &prefix_lsa->prefix);
if (buf) {
inet_ntop(AF_INET6, &in6, buf, buflen);
sprintf(&buf[strlen(buf)], "/%d",