Comment 9 for bug 1770394

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

Reviewed: https://review.opencontrail.org/43020
Committed: http://github.com/Juniper/contrail-controller/commit/9ad66279ef6c7eeb3fee451e1f9cf7920c998f26
Submitter: Zuul v3 CI (<email address hidden>)
Branch: master

commit 9ad66279ef6c7eeb3fee451e1f9cf7920c998f26
Author: Anda Nicolae <email address hidden>
Date: Thu May 10 15:26:12 2018 +0300

Coverity issues in contrail-controller/mvpn_table.cc

I have run Coverity on branch R5.0 and it reported the
following issues in contrail-controller/mvpn_table.cc:

- uninit_use_in_call: Using uninitialized value
prefix.ip_prefixlen_ when calling MvpnPrefix
- uninit_use_in_call: Using uninitialized value
prefix.asn_ when calling MvpnPrefix

The issues listed above are encountered in the following
functions from mvpn_table.cc:
MvpnTable::CreateType4LeafADRoutePrefix
MvpnTable::CreateType2ADRoutePrefix
MvpnTable::CreateType1ADRoutePrefix
MvpnTable::CreateType7PrefixFromType4
MvpnTable::CreateType3SPMSIRoutePrefix
MvpnTable::CreateType7SourceTreeJoinRoutePrefix

Indeed, the called MvpnPrefix constructor does not
initialize neither ip_prefixlen_, nor asn_.
Solution is to initialize these variables in all MvpnPrefix
constructors that did not initialize them.

Change-Id: Ie17837b10cfd0a0458d858d538987e51be1206a1
Closes-Bug: #1770394
Signed-off-by: Anda Nicolae <email address hidden>