mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-10 01:48:00 +00:00
Remember to terminate the prompt string in keyboard-interactive
[originally from svn r1425]
This commit is contained in:
parent
7e0ef0b253
commit
64df2cd90f
2
ssh.c
2
ssh.c
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user