From: Ralph Corderoy Date: Wed, 17 May 2017 14:15:18 +0000 (+0100) Subject: uip/mhbuildsbr.c: Fix long-line truncation when BUFSIZ is 1024. X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/f278151752398b42da2ab1ac666ebbd3cae33583?ds=inline uip/mhbuildsbr.c: Fix long-line truncation when BUFSIZ is 1024. 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. --- diff --git a/uip/mhbuildsbr.c b/uip/mhbuildsbr.c index 982d1047..8bd7be2d 100644 --- a/uip/mhbuildsbr.c +++ b/uip/mhbuildsbr.c @@ -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;