Coverity issue "56025 Uninitialized scalar field" reports the 'label' member
of class Node may be used uninitialized. While this is a debugging-only
integer and may be a false positive in actual use, the fix should be easy
and remove an issue from our dashboard:

Signed-off-by: Seth Arnold <[email protected]>

=== modified file 'parser/libapparmor_re/expr-tree.h'
--- parser/libapparmor_re/expr-tree.h   2015-10-14 20:49:26 +0000
+++ parser/libapparmor_re/expr-tree.h   2016-01-16 02:30:29 +0000
@@ -96,13 +96,13 @@
 /* An abstract node in the syntax tree. */
 class Node {
 public:
-       Node(): nullable(false) { child[0] = child[1] = 0; }
+       Node(): nullable(false), label(0) { child[0] = child[1] = 0; }
        Node(Node *left): nullable(false)
        {
                child[0] = left;
                child[1] = 0;
        }
-       Node(Node *left, Node *right): nullable(false)
+       Node(Node *left, Node *right): nullable(false), label(0)
        {
                child[0] = left;
                child[1] = right;

Compiled, passed the tests with the exception of bug 1534869, but that
also shows in 14.04 LTS packaging.

I checked that:
../apparmor_parser -Q -D dfa-states ./simple_tests/file/
gave output that looked about right.

Thanks

Attachment: signature.asc
Description: Digital signature

-- 
AppArmor mailing list
[email protected]
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/apparmor

Reply via email to