]> diplodocus.org Git - nmh/commitdiff
Increased sizes of a couple of buffers.
authorDavid Levine <levinedl@acm.org>
Sat, 22 Sep 2018 13:50:44 +0000 (09:50 -0400)
committerDavid Levine <levinedl@acm.org>
Sat, 22 Sep 2018 13:50:44 +0000 (09:50 -0400)
gcc 8 noticed that snprintfs could have overrun them.

sbr/addrsbr.c
sbr/mf.c

index 9b2973a..43352bd 100644 (file)
@@ -226,7 +226,7 @@ mnfree (struct mailname *mp)
 char *
 auxformat (struct mailname *mp, int extras)
 {
 char *
 auxformat (struct mailname *mp, int extras)
 {
-    static char addr[BUFSIZ];
+    static char addr[BUFSIZ-4];
     static char buffer[BUFSIZ];
 
        if (mp->m_nohost)
     static char buffer[BUFSIZ];
 
        if (mp->m_nohost)
index 4f59e61..93528ee 100644 (file)
--- a/sbr/mf.c
+++ b/sbr/mf.c
@@ -138,7 +138,7 @@ static char *host = NULL;
 static char *routepath = NULL;
 static char *grp = NULL;
 static char *note = NULL;
 static char *routepath = NULL;
 static char *grp = NULL;
 static char *note = NULL;
-static char err[BUFSIZ];
+static char err[BUFSIZ+39];
 static char adr[BUFSIZ];
 
 static struct adrx  adrxs2;
 static char adr[BUFSIZ];
 
 static struct adrx  adrxs2;