1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-10 09:58:01 +00:00

Remember to terminate the prompt string in keyboard-interactive

[originally from svn r1425]
This commit is contained in:
Simon Tatham 2001-11-29 20:27:20 +00:00
parent 7e0ef0b253
commit 64df2cd90f

2
ssh.c
View File

@ -4155,6 +4155,8 @@ static void do_ssh2_authconn(unsigned char *in, int inlen, int ispkt)
ssh2_pkt_getstring(&prompt, &prompt_len);
strncpy(pwprompt, prompt, sizeof(pwprompt));
pwprompt[prompt_len < sizeof(pwprompt) ?
prompt_len : sizeof(pwprompt)-1] = '\0';
need_pw = TRUE;
echo = ssh2_pkt_getbool();