Coverity issues in contrail-controller/oper
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
Juniper Openstack | Status tracked in Trunk | |||||
R5.0 |
In Progress
|
Undecided
|
Anda-Maria Nicolae | |||
Trunk |
In Progress
|
Undecided
|
Anda-Maria Nicolae | |||
OpenContrail |
New
|
Undecided
|
Unassigned |
Bug Description
Hi all,
I have run Coverity on branch R5.0 and it reported the following issues in contrail-
- leaked_storage: Variable multicast_peer_path going out of scope leaks the storage it points to in agent_route.
Indeed, multicast_peer_path should be freed if the following condition is matched:
if (!nh) {
- buffer_
Indeed, if name.c_str() is longer than IF_NAMESIZE bytes, then ifrn.ifrn_name will not end in '\0'.
Solution is to use:
strncpy(
since ifrn.ifrn_name was previously zeroed via memset.
tags: | added: contrail-control |
Review in progress for https:/ /review. opencontrail. org/42982
Submitter: Anda Nicolae (<email address hidden>)