1
0
mirror of https://github.com/Yubico/yubico-pam.git synced 2025-02-22 00:54:30 +01:00

Merge pull request #88 from shankerwangmiao/bug-fix-for-null-conv

add check for NULL conv
This commit is contained in:
Klas Lindfors 2016-02-16 13:55:08 +01:00
commit 27d6a286d7

View File

@ -407,6 +407,10 @@ display_error(pam_handle_t *pamh, const char *message) {
return retval;
}
if(!conv || !conv->conv){
D(("conv() function invalid"));
return PAM_CONV_ERR;
}
pmsg[0] = &msg[0];
msg[0].msg = (char *) message; /* on some systems, pam_message.msg isn't const */
msg[0].msg_style = PAM_ERROR_MSG;