From 8f1cdb3193c92c863c08a8836341ff54c9c17f7b Mon Sep 17 00:00:00 2001 From: Nathan Kinder Date: Wed, 15 Sep 2010 14:58:53 -0700 Subject: 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. --- lib/libaccess/acl.tab.cpp | 3 +-- 1 file changed, 1 insertion(+), 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 /* -- cgit