Fix svace issue of reading uninitialized data 01/80401/1
authorSomin Kim <somin926.kim@samsung.com>
Mon, 18 Jul 2016 02:50:03 +0000 (11:50 +0900)
committerSomin Kim <somin926.kim@samsung.com>
Mon, 18 Jul 2016 02:50:03 +0000 (11:50 +0900)
Change-Id: I99c124e003e653407b620fafc60de6af7339b0a7
Signed-off-by: Somin Kim <somin926.kim@samsung.com>
src/rule_validator.cpp

index a87cc27..fd0aa9e 100644 (file)
@@ -475,10 +475,10 @@ bool check_template_int(ctx::Json& elem)
        std::list<std::string> elem_keys;
        elem.getKeys(&elem_keys);
 
-       bool min;
-       bool max;
-       int min_val;
-       int max_val;
+       bool min = false;
+       bool max = false;
+       int min_val = 0;
+       int max_val = 0;
 
        for (std::list<std::string>::iterator it2 = elem_keys.begin(); it2 != elem_keys.end(); it2++) {
                std::string elem_key = *it2;