commit 415096545165582cfa4ddd77f1122807a71f32a4
Author: Anda Nicolae <email address hidden>
Date: Thu May 10 19:32:12 2018 +0300
Coverity issues in contrail-controller/pkt_sandesh_flow.cc
I have run Coverity on branch R5.0 and it reported the
following issues in contrail-controller/pkt_sandesh_flow.cc:
- uninit_use_in_call: Using uninitialized value vrf_id when calling
InetRouteFlowMgmtKey in pkt_sandesh_flow.cc:StringToInetRouteFlowMgmtKey
vrf_id_ is initialized if the following condition is fulfilled:
if (getline(ss, item, ch))
However, the initialization of vrf_id may fail, and therefore we need
to initialize it at declaration time.
- uninit_use_in_call: Using uninitialized value plen when calling
InetRouteFlowMgmtKey in pkt_sandesh_flow.cc:StringToInetRouteFlowMgmtKey
Similar logic as for vrf_id_. We need to initialize plen atdeclaration
time.
- uninit_use: Using uninitialized value mgr_id
in pkt_sandesh_flow.cc:StringToInetRouteFlowMgmtKey
Similar logic as for vrf_id_ and plen. We need to initialize
mgr_id at declaration time.
- uninit_use: Using uninitialized value proto
in pkt_sandesh_flow.cc:SetFlowKey
Similar logic as for vrf_id_, plen and mgr_id.
We need to initialize proto at declaration time.
Change-Id: I1ff631568616821e641cd37dcdd60128df1ab001
Closes-Bug: #1770441
Signed-off-by: Anda Nicolae <email address hidden>
Reviewed: https:/ /review. opencontrail. org/42943 github. com/Juniper/ contrail- controller/ commit/ 415096545165582 cfa4ddd77f11228 07a71f32a4
Committed: http://
Submitter: Zuul v3 CI (<email address hidden>)
Branch: R5.0
commit 415096545165582 cfa4ddd77f11228 07a71f32a4
Author: Anda Nicolae <email address hidden>
Date: Thu May 10 19:32:12 2018 +0300
Coverity issues in contrail- controller/ pkt_sandesh_ flow.cc
I have run Coverity on branch R5.0 and it reported the controller/ pkt_sandesh_ flow.cc:
following issues in contrail-
- uninit_use_in_call: Using uninitialized value vrf_id when calling mtKey in pkt_sandesh_ flow.cc: StringToInetRou teFlowMgmtKey
InetRouteFlowMg
vrf_id_ is initialized if the following condition is fulfilled:
if (getline(ss, item, ch))
However, the initialization of vrf_id may fail, and therefore we need
to initialize it at declaration time.
- uninit_use_in_call: Using uninitialized value plen when calling mtKey in pkt_sandesh_ flow.cc: StringToInetRou teFlowMgmtKey
InetRouteFlowMg
Similar logic as for vrf_id_. We need to initialize plen atdeclaration
time.
- uninit_use: Using uninitialized value mgr_id flow.cc: StringToInetRou teFlowMgmtKey
in pkt_sandesh_
Similar logic as for vrf_id_ and plen. We need to initialize
mgr_id at declaration time.
- uninit_use: Using uninitialized value proto flow.cc: SetFlowKey
in pkt_sandesh_
Similar logic as for vrf_id_, plen and mgr_id.
We need to initialize proto at declaration time.
Change-Id: I1ff63156861682 1e641cd37dcdd60 128df1ab001
Closes-Bug: #1770441
Signed-off-by: Anda Nicolae <email address hidden>