summaryrefslogtreecommitdiffstats
path: root/parameter
diff options
context:
space:
mode:
authorFrancois Gaffie <francois.gaffie@intel.com>2015-02-19 15:39:33 +0100
committerFrancois Gaffie <francois.gaffie@intel.com>2015-02-19 16:56:31 +0100
commit770f8e13f7608b4b7f356c0bcf662ba6392b5c02 (patch)
tree536da0c8ee6fbd6074953c768525c49a448ada5a /parameter
parent4f03c87b6eedf3c4e38c55a4a831ef3c1f63ebc8 (diff)
downloadexternal_parameter-framework-770f8e13f7608b4b7f356c0bcf662ba6392b5c02.zip
external_parameter-framework-770f8e13f7608b4b7f356c0bcf662ba6392b5c02.tar.gz
external_parameter-framework-770f8e13f7608b4b7f356c0bcf662ba6392b5c02.tar.bz2
Output parameter within getNumericalValue not initialized
When calling getNumericalValue on inclusive criterion, the value to be outputed is never initialized. The Criterion type will append the value corresponding to each literal value to the uninitialized value leading to undefined behavior. This patch initializes the output value. Issue: GMINL-6007 Change-Id: Id9fc8b010b4d0b6dfc921825387817789d35e5ba Signed-off-by: Francois Gaffie <francois.gaffie@intel.com>
Diffstat (limited to 'parameter')
-rw-r--r--parameter/SelectionCriterionType.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/parameter/SelectionCriterionType.cpp b/parameter/SelectionCriterionType.cpp
index 95e8e46..2f17379 100644
--- a/parameter/SelectionCriterionType.cpp
+++ b/parameter/SelectionCriterionType.cpp
@@ -80,6 +80,7 @@ bool CSelectionCriterionType::getNumericalValue(const std::string& strValue, int
uint32_t uiNbValues = astrValues.size();
int iResult = 0;
uint32_t uiValueIndex;
+ iValue = 0;
// Looping on each std::string delimited by "|" token and adding the associated value
for (uiValueIndex = 0; uiValueIndex < uiNbValues; uiValueIndex++) {