summaryrefslogtreecommitdiffstats
path: root/color.c
diff options
context:
space:
mode:
authorKevin McCarthy <kevin@8t8.us>2018-05-21 13:33:14 -0700
committerKevin McCarthy <kevin@8t8.us>2018-05-21 13:33:14 -0700
commita001b1d3400651d4a32812f86314e1de0f635388 (patch)
tree8b2e58b96fcfe68cdcdd60de28f0dbe2f5459591 /color.c
parentd55950a8571b8f3fbe6dbf6cdc4ec75a477b10e6 (diff)
Fix mutt_strncmp size comparison for 'uncolor header'.
Thanks to Fabian Groffen for pointing out the discrepancy. mutt_extract_token() null-terminates the token,, so actually there is no need to use "strncmp" for the comparison in this case. However, since the token is being checked against Fields there is no potential harm of a prefix match, so we should fix the number to be consistent with the other token comparisons.
Diffstat (limited to 'color.c')
-rw-r--r--color.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/color.c b/color.c
index 48ca1f8d..af979dfc 100644
--- a/color.c
+++ b/color.c
@@ -428,7 +428,7 @@ static int _mutt_parse_uncolor (BUFFER *buf, BUFFER *s, unsigned long data,
}
else if (mutt_strncmp (buf->data, "body", 4) == 0)
list = &ColorBodyList;
- else if (mutt_strncmp (buf->data, "header", 7) == 0)
+ else if (mutt_strncmp (buf->data, "header", 6) == 0)
list = &ColorHdrList;
else
{