Skip to content

Commit

Permalink
Merge "Coverity issues in contrail-controller/agent_param.cc"
Browse files Browse the repository at this point in the history
  • Loading branch information
Zuul v3 CI authored and opencontrail-ci-admin committed Jun 5, 2018
2 parents 135111b + e055240 commit 7cb8289
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/vnsw/agent/init/agent_param.cc
Expand Up @@ -955,7 +955,7 @@ static bool ValidateInterface(bool test_mode, const std::string &ifname,

struct ifreq ifr;
memset(&ifr, 0, sizeof(ifr));
strncpy(ifr.ifr_name, ifname.c_str(), IF_NAMESIZE);
strncpy(ifr.ifr_name, ifname.c_str(), IF_NAMESIZE-1);
int err = ioctl(fd, SIOCGIFFLAGS, (void *)&ifr);
close (fd);

Expand All @@ -979,6 +979,7 @@ static bool ValidateInterface(bool test_mode, const std::string &ifname,
*eth_encap = "none";
}
}
fclose(f);
}
#endif

Expand Down

0 comments on commit 7cb8289

Please sign in to comment.