X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/23e649c97fc92d822cdaba2e9febc3099de77673..ecb2572233d5f3d3523a46979077ac0c20044d58:/unix/uxcons.c diff --git a/unix/uxcons.c b/unix/uxcons.c index 2021f40e..11c59a8a 100644 --- a/unix/uxcons.c +++ b/unix/uxcons.c @@ -161,7 +161,8 @@ int verify_ssh_host_key(void *frontend, char *host, int port, char *keytype, newmode.c_lflag |= ECHO | ISIG | ICANON; tcsetattr(0, TCSANOW, &newmode); line[0] = '\0'; - read(0, line, sizeof(line) - 1); + if (read(0, line, sizeof(line) - 1) <= 0) + /* handled below */; tcsetattr(0, TCSANOW, &oldmode); } @@ -213,7 +214,8 @@ int askalg(void *frontend, const char *algtype, const char *algname, newmode.c_lflag |= ECHO | ISIG | ICANON; tcsetattr(0, TCSANOW, &newmode); line[0] = '\0'; - read(0, line, sizeof(line) - 1); + if (read(0, line, sizeof(line) - 1) <= 0) + /* handled below */; tcsetattr(0, TCSANOW, &oldmode); } @@ -266,7 +268,8 @@ int askappend(void *frontend, Filename filename, newmode.c_lflag |= ECHO | ISIG | ICANON; tcsetattr(0, TCSANOW, &newmode); line[0] = '\0'; - read(0, line, sizeof(line) - 1); + if (read(0, line, sizeof(line) - 1) <= 0) + /* handled below */; tcsetattr(0, TCSANOW, &oldmode); }