]> 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 9b2973a369fc8c77d4a9671213495096d91eb025..43352bde24cb49c59ebe011f17ee5361f9f55853 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 4f59e616b07558617b9a0dd12bb042ef8f77b3ef..93528ee22ec05dc2b4dcee2ce445bbc5268ad6e4 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;