From 200068032469b285795817e43d4f48d57c1bcbe5 Mon Sep 17 00:00:00 2001 From: Michael Elkins Date: Sun, 21 Mar 2010 09:52:44 -0700 Subject: [PATCH] Do not assume whitespace follows the colon in a header field. Closes #3385. --- sendlib.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sendlib.c b/sendlib.c index 45e62c027..09460240b 100644 --- a/sendlib.c +++ b/sendlib.c @@ -1799,7 +1799,9 @@ static int write_one_header (FILE *fp, int pfxw, int max, int wraplen, else { tagbuf = mutt_substrdup (start, t); - valbuf = mutt_substrdup (t + 2, end); + ++t; /* skip over the colon separating the header field name and value */ + SKIPWS(t); /* skip over any leading whitespace */ + valbuf = mutt_substrdup (t, end); } dprint(4,(debugfile,"mwoh: buf[%s%s] too long, " "max width = %d > %d\n", -- 2.40.0