Check that conv and conv->conv are non-null (fixes cron segfault)
[public/libpam-csc.git] / pam_csc.c
index f631d3c..c228f38 100644 (file)
--- 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;