commit | 7dd4ce29facfbe83c5de1e8a34be92b57b9248d3 | [log] [tgz] |
---|---|---|
author | Michal Vasko <mvasko@cesnet.cz> | Thu Mar 29 11:29:02 2018 +0200 |
committer | Michal Vasko <mvasko@cesnet.cz> | Thu Mar 29 11:29:02 2018 +0200 |
tree | e1a592cd77daa019da1b53f659c2316b2d6b2d15 | |
parent | a686c233f7740e8d3cae8a7076efa87e22cf2931 [diff] |
client session CHANGE properly detect fscanf error
diff --git a/src/session_client_ssh.c b/src/session_client_ssh.c index 2f70695..400e9df 100644 --- a/src/session_client_ssh.c +++ b/src/session_client_ssh.c
@@ -291,7 +291,7 @@ do { if (fscanf(stdin, "%4s", answer) == EOF) { - ERR("fscanf() failed (%s).", strerror(errno)); + ERR("fscanf() failed (%s).", ferror(stdin) ? strerror(errno) : "EOF"); goto fail; } while (((c = getchar()) != EOF) && (c != '\n'));