summaryrefslogtreecommitdiff
path: root/auth-pam.c
diff options
context:
space:
mode:
Diffstat (limited to 'auth-pam.c')
-rw-r--r--auth-pam.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/auth-pam.c b/auth-pam.c
index bfd8f3270..35aecbdb4 100644
--- a/auth-pam.c
+++ b/auth-pam.c
@@ -984,7 +984,8 @@ sshpam_tty_conv(int n, sshpam_const struct pam_message **msg,
984 break; 984 break;
985 case PAM_PROMPT_ECHO_ON: 985 case PAM_PROMPT_ECHO_ON:
986 fprintf(stderr, "%s\n", PAM_MSG_MEMBER(msg, i, msg)); 986 fprintf(stderr, "%s\n", PAM_MSG_MEMBER(msg, i, msg));
987 fgets(input, sizeof input, stdin); 987 if (fgets(input, sizeof input, stdin) == NULL)
988 input[0] = '\0';
988 if ((reply[i].resp = strdup(input)) == NULL) 989 if ((reply[i].resp = strdup(input)) == NULL)
989 goto fail; 990 goto fail;
990 reply[i].resp_retcode = PAM_SUCCESS; 991 reply[i].resp_retcode = PAM_SUCCESS;