From: Kevin McCarthy Date: Mon, 21 May 2018 20:33:14 +0000 (-0700) Subject: Fix mutt_strncmp size comparison for 'uncolor header'. X-Git-Tag: mutt-1-11-rel~158 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a001b1d3400651d4a32812f86314e1de0f635388;p=mutt 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. --- 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 {