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:
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);
|
ssh2_pkt_getstring(&prompt, &prompt_len);
|
||||||
strncpy(pwprompt, prompt, sizeof(pwprompt));
|
strncpy(pwprompt, prompt, sizeof(pwprompt));
|
||||||
|
pwprompt[prompt_len < sizeof(pwprompt) ?
|
||||||
|
prompt_len : sizeof(pwprompt)-1] = '\0';
|
||||||
need_pw = TRUE;
|
need_pw = TRUE;
|
||||||
|
|
||||||
echo = ssh2_pkt_getbool();
|
echo = ssh2_pkt_getbool();
|
||||||
|
Loading…
Reference in New Issue
Block a user