summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathan Kinder <nkinder@redhat.com>2010-09-15 14:58:53 -0700
committerNathan Kinder <nkinder@redhat.com>2010-09-15 14:58:53 -0700
commit8f1cdb3193c92c863c08a8836341ff54c9c17f7b (patch)
treeea35ab1b23520ef5caa7afb8f3c6a70d4761adf3
parentb83f966e5ce1d5a3e70521b15f92b9f6ba988b1c (diff)
downloadds-8f1cdb3193c92c863c08a8836341ff54c9c17f7b.tar.gz
ds-8f1cdb3193c92c863c08a8836341ff54c9c17f7b.tar.xz
ds-8f1cdb3193c92c863c08a8836341ff54c9c17f7b.zip
Bug 630091 - (cov#12209) Use of uninitialized pointer in libaccess
It looks like aclpvt is only initialized before use if __cplusplus or lint are defined. I see no harm in always initializing aclpvt to NULL, which will guarantee that we don't use an uninitialized pointer.
-rw-r--r--lib/libaccess/acl.tab.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/libaccess/acl.tab.cpp b/lib/libaccess/acl.tab.cpp
index 6cab7d97..5f6610d9 100644
--- a/lib/libaccess/acl.tab.cpp
+++ b/lib/libaccess/acl.tab.cpp
@@ -724,7 +724,7 @@ int acl_Parse(void)
int acl_Parse()
#endif
{
- register ACLSTYPE *aclpvt; /* top of value stack for $vars */
+ register ACLSTYPE *aclpvt = 0; /* top of value stack for $vars */
#if defined(__cplusplus) || defined(lint)
/*
@@ -737,7 +737,6 @@ int acl_Parse()
case 1: goto aclerrlab;
case 2: goto aclnewstate;
}
- aclpvt = 0;
#endif
/*