summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur de Jong <arthur@arthurdejong.org>2013-09-13 13:31:15 +0200
committerArthur de Jong <arthur@arthurdejong.org>2013-09-13 13:32:19 +0200
commit2bd2bc470c824453cd002f151db9d668f609fc10 (patch)
treebf21afa07ee3734b89d2be551aad3beeb7612418
parentdccc9cf7cbbe3cae606a7761897c9d514b467aeb (diff)
Initialise msg to avoid potential NULL pointer dereference
The NULL pointer dereference in the PAM module should not occur due to the relationship with the rc value that is handled alongside it. This change mostly silences the compiler and protects from future changes.
-rw-r--r--pam/pam.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pam/pam.c b/pam/pam.c
index 5898ae1..2b67c73 100644
--- a/pam/pam.c
+++ b/pam/pam.c
@@ -539,7 +539,7 @@ int pam_sm_acct_mgmt(pam_handle_t *pamh, int flags,
const char *username, *service;
const char *ruser = NULL, *rhost = NULL, *tty = NULL;
struct nslcd_resp authz_resp;
- const char *msg;
+ const char *msg = NULL;
/* set up configuration */
cfg_init(pamh, flags, argc, argv, &cfg);
rc = init(pamh, &cfg, &ctx, &username, &service, &ruser, &rhost, &tty);