1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-04-10 07:38:06 -05:00

Windows Plink: treat EOF at host key prompt as 'abort connection'.

Thanks to Didrik Nordström for pointing out that we currently treated
it as 'whatever happened to be in line[0] before ReadFile didn't get
any data'.
This commit is contained in:
Simon Tatham 2017-02-15 06:03:50 +00:00
parent 1266ac0e30
commit 24c9cfc800

View File

@ -131,6 +131,8 @@ int verify_ssh_host_key(void *frontend, char *host, int port,
fflush(stderr);
}
line[0] = '\0'; /* fail safe if ReadFile returns no data */
hin = GetStdHandle(STD_INPUT_HANDLE);
GetConsoleMode(hin, &savemode);
SetConsoleMode(hin, (savemode | ENABLE_ECHO_INPUT |