]> diplodocus.org Git - nmh/commitdiff
uip/mhbuildsbr.c: Fix long-line truncation when BUFSIZ is 1024.
authorRalph Corderoy <ralph@inputplus.co.uk>
Wed, 17 May 2017 14:15:18 +0000 (15:15 +0100)
committerRalph Corderoy <ralph@inputplus.co.uk>
Wed, 17 May 2017 14:15:18 +0000 (15:15 +0100)
a23477eb changed one char array from BUFSIZ to NMH_BUFSIZ elements, but
the long line read into it was passed to user_content() that
strncpy(3)'d it, silently truncating, to another char array, still
BUFSIZ long.  This show up on platforms where BUFSIZ is 1024 versus
NMH_BUFSIZ's minimum of 8192.

uip/mhbuildsbr.c

index 982d104..8bd7be2 100644 (file)
@@ -645,7 +645,7 @@ user_content (FILE *in, char *buf, CT *ctp, const char *infilename)
 {
     int        extrnal, vrsn;
     char *cp, **ap;
-    char buffer[BUFSIZ];
+    char buffer[NMH_BUFSIZ];
     struct multipart *m;
     struct part **pp;
     struct stat st;