From a3ad4d5a863c9e1ac35e725c97ccabad12a85859 Mon Sep 17 00:00:00 2001 From: David Bartley Date: Sat, 13 Oct 2007 00:02:41 -0400 Subject: [PATCH] Check that conv and conv->conv are non-null (fixes cron segfault) --- debian/changelog | 6 ++++++ pam_csc.c | 2 ++ 2 files changed, 8 insertions(+) diff --git a/debian/changelog b/debian/changelog index 7b7144d..1d48cc6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +libpam-csc (1.4) stable testing; urgency=low + + * Check that conv and conv->conv are non-null (fixes cron segfault) + + -- David Bartley Sun, 14 Oct 2007 01:59:54 -0400 + libpam-csc (1.3) stable testing; urgency=low * Added allowed usernames check diff --git a/pam_csc.c b/pam_csc.c index f631d3c..c228f38 100644 --- a/pam_csc.c +++ b/pam_csc.c @@ -144,6 +144,8 @@ int pam_csc_print_message(pam_handle_t* pamh, char* msg, int style) /* output message */ WARN_PAM( pam_get_item(pamh, PAM_CONV, (const void**)&conv) ) + if(!conv || !conv->conv) + goto cleanup; messages[0] = &message; message.msg_style = style; message.msg = msg;