X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/975b8341cc7ff17cbe4a5900b6ed41c47cceed62..d98ae2c6142ed5071a8fa5a4238b43a722effa82:/sbr/ruserpass.c diff --git a/sbr/ruserpass.c b/sbr/ruserpass.c index 7669f8bb..a55f6803 100644 --- a/sbr/ruserpass.c +++ b/sbr/ruserpass.c @@ -148,7 +148,9 @@ ruserpass(char *host, char **aname, char **apass) } printf("Name (%s:%s): ", host, myname); - fgets(tmp, sizeof(tmp) - 1, stdin); + if (fgets(tmp, sizeof(tmp) - 1, stdin) == NULL) { + advise ("tmp", "fgets"); + } tmp[strlen(tmp) - 1] = '\0'; if (*tmp != '\0') { myname = tmp;