imapext-2007

changeset 10:cd53ed0e4bb2 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 diff
     1.1 --- a/src/mtest/mtest.c	Sun May 07 11:49:04 2023 +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,".");

UW-IMAP'd extensions by yuuji