diff options
| author | Jafar Al-Gharaibeh <Jafaral@users.noreply.github.com> | 2017-08-31 10:25:55 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-08-31 10:25:55 -0500 |
| commit | 959768e8d049303c434bcb67e64d19bae65d073a (patch) | |
| tree | 0387049fc8de44d6a22fafe639f58f6cfb9113f7 /zebra/rt_netlink.c | |
| parent | edfb96d21eb0dc5ad4578d74597bc397e22f6e08 (diff) | |
| parent | 1e9f448fe1b60e464d187c96092d2cf6201e64e1 (diff) | |
Merge pull request #1044 from donaldsharp/combination
Coverity Cleanup of Stuff
Diffstat (limited to 'zebra/rt_netlink.c')
| -rw-r--r-- | zebra/rt_netlink.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c index 3f9782d442..d1fd1a968a 100644 --- a/zebra/rt_netlink.c +++ b/zebra/rt_netlink.c @@ -588,8 +588,8 @@ static int netlink_route_change_read_multicast(struct sockaddr_nl *snl, if (IS_ZEBRA_DEBUG_KERNEL) { struct interface *ifp; - strcpy(sbuf, inet_ntoa(m->sg.src)); - strcpy(gbuf, inet_ntoa(m->sg.grp)); + strlcpy(sbuf, inet_ntoa(m->sg.src), sizeof(sbuf)); + strlcpy(gbuf, inet_ntoa(m->sg.grp), sizeof(gbuf)); for (count = 0; count < oif_count; count++) { ifp = if_lookup_by_index(oif[count], vrf); char temp[256]; @@ -1562,6 +1562,8 @@ int kernel_get_ipmr_sg_stats(struct zebra_vrf *zvrf, void *in) int kernel_route_rib(struct prefix *p, struct prefix *src_p, struct route_entry *old, struct route_entry *new) { + assert(old || new); + if (!old && new) return netlink_route_multipath(RTM_NEWROUTE, p, src_p, new, 0); if (old && !new) |
