summaryrefslogtreecommitdiffstats
path: root/copy.c
diff options
context:
space:
mode:
authorKevin McCarthy <kevin@8t8.us>2017-01-29 11:02:50 -0800
committerKevin McCarthy <kevin@8t8.us>2017-01-29 11:02:50 -0800
commit917d5bd0610eee78241617dd2d6c0f3b40dafb44 (patch)
treebe08582dd89137514c6e19454d11d148b2204572 /copy.c
parent9ae62494d8315234b48618301bc88d31b65f297e (diff)
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.
Diffstat (limited to 'copy.c')
-rw-r--r--copy.c8
1 files changed, 4 insertions, 4 deletions
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);
}