From f278151752398b42da2ab1ac666ebbd3cae33583 Mon Sep 17 00:00:00 2001 From: Ralph Corderoy Date: Wed, 17 May 2017 15:15:18 +0100 Subject: [PATCH] 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. --- uip/mhbuildsbr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.56.0