Mercurial > hgrepos > hgweb.cgi > imapext
changeset 10:cd53ed0e4bb2 draft imapext-2007-2
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 | 0196ff555697 |
children | 4f5400cea456 |
files | src/mtest/mtest.c |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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,".");