From: Kevin McCarthy Date: Sun, 29 Jan 2017 19:02:50 +0000 (-0800) Subject: Fix the x-label update code check location. X-Git-Tag: mutt-1-8-rel~30 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=917d5bd0610eee78241617dd2d6c0f3b40dafb44;p=mutt Fix the x-label update code check location. The x-label comparison was outside the "beginning of header" block. This meant that it could theoretically match a continuation line. Additionally, the continuation lines of x-labels would not be stripped, because the comparison was after the ignore variable was reset. Move the comparison inside the block and before the ignore reset. --- diff --git a/copy.c b/copy.c index f4dbba3e..af6e2691 100644 --- a/copy.c +++ b/copy.c @@ -108,13 +108,13 @@ mutt_copy_hdr (FILE *in, FILE *out, LOFF_T off_start, LOFF_T off_end, int flags, if ((flags & CH_UPDATE_IRT) && ascii_strncasecmp ("In-Reply-To:", buf, 12) == 0) continue; + if (flags & CH_UPDATE_LABEL && + ascii_strncasecmp ("X-Label:", buf, 8) == 0) + continue; + ignore = 0; } - if (flags & CH_UPDATE_LABEL && - ascii_strncasecmp ("X-Label:", buf, 8) == 0) - continue; - if (!ignore && fputs (buf, out) == EOF) return (-1); }