Comment 6 for bug 1770441

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/42943
Committed: http://github.com/Juniper/contrail-controller/commit/415096545165582cfa4ddd77f1122807a71f32a4
Submitter: Zuul v3 CI (<email address hidden>)
Branch: R5.0

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>