[iccpd] Fix uninitialized variable. (#5112)
To declare *tb[] but do not initialize it, it might be very risky. We get iccpd exception during processing arp/nd event. Initialize it to {0};
This commit is contained in:
parent
a273e56bc6
commit
570dbf52f6
@ -502,7 +502,7 @@ int do_one_neigh_request(struct nlmsghdr *n)
|
||||
{
|
||||
struct ndmsg *ndm = NLMSG_DATA(n);
|
||||
int len = n->nlmsg_len;
|
||||
struct rtattr * tb[NDA_MAX + 1];
|
||||
struct rtattr *tb[NDA_MAX + 1] = {0};
|
||||
|
||||
if (n->nlmsg_type == NLMSG_DONE)
|
||||
{
|
||||
@ -966,7 +966,7 @@ void iccp_parse_if_vlan_info_from_netlink(struct nlmsghdr *n)
|
||||
{
|
||||
struct ifinfomsg *ifm = NLMSG_DATA(n);
|
||||
int len = n->nlmsg_len;
|
||||
struct rtattr * tb[IFLA_MAX + 1];
|
||||
struct rtattr *tb[IFLA_MAX + 1] = {0};
|
||||
|
||||
if (n->nlmsg_type != RTM_NEWLINK)
|
||||
{
|
||||
|
Reference in New Issue
Block a user