Index: tftpmain.c =================================================================== RCS file: /var/cvs/userland/netflash/tftpmain.c,v retrieving revision 1.2 diff -u -r1.2 tftpmain.c --- tftpmain.c 2001/06/26 19:07:44 1.2 +++ tftpmain.c 2002/04/29 14:29:45 @@ -167,7 +170,7 @@ if (argc < 2) { strcpy(tftpline, "Connect "); printf("(to) "); - gets(&tftpline[strlen(tftpline)]); + fgets(&tftpline[strlen(tftpline)], sizeof(tftpline)-strlen(tftpline), stdin); tftpmakeargv(); argc = tftpmargc; argv = tftpmargv; @@ -287,7 +290,7 @@ if (argc < 2) { strcpy(tftpline, "send "); printf("(file) "); - gets(&tftpline[strlen(tftpline)]); + fgets(&tftpline[strlen(tftpline)], sizeof(tftpline)-strlen(tftpline), stdin); tftpmakeargv(); argc = tftpmargc; argv = tftpmargv; @@ -379,7 +382,7 @@ if (argc < 2) { strcpy(tftpline, "get "); printf("(files) "); - gets(&tftpline[strlen(tftpline)]); + fgets(&tftpline[strlen(tftpline)], sizeof(tftpline)-strlen(tftpline),stdin); tftpmakeargv(); argc = tftpmargc; argv = tftpmargv; @@ -464,7 +467,7 @@ if (argc < 2) { strcpy(tftpline, "Rexmt-timeout "); printf("(value) "); - gets(&tftpline[strlen(tftpline)]); + fgets(&tftpline[strlen(tftpline)], sizeof(tftpline)-strlen(tftpline), stdin); tftpmakeargv(); argc = tftpmargc; argv = tftpmargv; @@ -492,7 +495,7 @@ if (argc < 2) { strcpy(tftpline, "Maximum-timeout "); printf("(value) "); - gets(&tftpline[strlen(tftpline)]); + fgets(&tftpline[strlen(tftpline)], sizeof(tftpline)-strlen(tftpline), stdin); tftpmakeargv(); argc = tftpmargc; argv = tftpmargv; @@ -559,7 +562,7 @@ putchar('\n'); for (;;) { printf("%s> ", prompt); - if (gets(tftpline) == 0) { + if (fgets(tftpline, sizeof(tftpline), stdin) == 0) { if (feof(stdin)) { tftpquit(); } else {