From: Michael Elkins Date: Sun, 21 Mar 2010 16:52:44 +0000 (-0700) Subject: Do not assume whitespace follows the colon in a header field. X-Git-Tag: mutt-1-5-21-rel~85 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3f7c6965d8bfbac69274eb35d92d92aed7d78d5c;p=mutt Do not assume whitespace follows the colon in a header field. Closes #3385. --- diff --git a/sendlib.c b/sendlib.c index 45e62c02..09460240 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",