imapext-2007
diff src/mtest/mtest.c @ 10:cd53ed0e4bb2
For FreeBSD13, use fgets() instead of gets() which causes link error.
Note that other ancient insecure function calls are left as they were
because mtest is not for daily use.
author | HIROSE Yuuji <yuuji@gentei.org> |
---|---|
date | Sun, 07 May 2023 12:46:12 +0900 |
parents | ada5e610ab86 |
children |
line diff
1.1 --- a/src/mtest/mtest.c Mon Sep 14 15:17:45 2009 +0900 1.2 +++ b/src/mtest/mtest.c Sun May 07 12:46:12 2023 +0900 1.3 @@ -595,7 +595,7 @@ 1.4 void prompt (char *msg,char *txt) 1.5 { 1.6 printf ("%s",msg); 1.7 - gets (txt); 1.8 + fgets (txt,MAILTMPLEN-1,stdin); 1.9 } 1.10 1.11 /* Interfaces to C-client */ 1.12 @@ -779,7 +779,7 @@ 1.13 puts (" Msg (end with a line with only a '.'):"); 1.14 body->type = TYPETEXT; 1.15 *text = '\0'; 1.16 - while (gets (line)) { 1.17 + while (fgets (line,MAILTMPLEN-1,stdin)) { 1.18 if (line[0] == '.') { 1.19 if (line[1] == '\0') break; 1.20 else strcat (text,".");