# HG changeset patch # User HIROSE Yuuji # Date 1683431172 -32400 # Node ID cd53ed0e4bb29a4b3e0b87158eba8a82a86796cc # Parent 0196ff555697beccfbd771522cd9fd773408687b 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. diff -r 0196ff555697 -r cd53ed0e4bb2 src/mtest/mtest.c --- a/src/mtest/mtest.c Sun May 07 11:49:04 2023 +0900 +++ b/src/mtest/mtest.c Sun May 07 12:46:12 2023 +0900 @@ -595,7 +595,7 @@ void prompt (char *msg,char *txt) { printf ("%s",msg); - gets (txt); + fgets (txt,MAILTMPLEN-1,stdin); } /* Interfaces to C-client */ @@ -779,7 +779,7 @@ puts (" Msg (end with a line with only a '.'):"); body->type = TYPETEXT; *text = '\0'; - while (gets (line)) { + while (fgets (line,MAILTMPLEN-1,stdin)) { if (line[0] == '.') { if (line[1] == '\0') break; else strcat (text,".");