lib/libaccess/acl.tab.cpp | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
New commits:
commit 8f1cdb3193c92c863c08a8836341ff54c9c17f7b
Author: Nathan Kinder <nkinder(a)redhat.com>
Date: Wed Sep 15 14:58:53 2010 -0700
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.
diff --git a/lib/libaccess/acl.tab.cpp b/lib/libaccess/acl.tab.cpp
index 6cab7d9..5f6610d 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
/*
Show replies by date