From: Ralph Corderoy Date: Sun, 23 Oct 2016 22:20:45 +0000 (+0100) Subject: Use HasPrefix() instead of strncmp(). X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/f6c3a4d9f5b6a13741331645e98baec9a0d8897e Use HasPrefix() instead of strncmp(). --- diff --git a/uip/mhfixmsg.c b/uip/mhfixmsg.c index ee25624c..0c5c2cef 100644 --- a/uip/mhfixmsg.c +++ b/uip/mhfixmsg.c @@ -2526,7 +2526,7 @@ fix_filename_param (char *name, char *value, PM *first_pm, PM *last_pm) { int fixed = 0; if (((value_len = strlen (value)) > 0) && - strncmp (value, "=?", 2) == 0 && + HasPrefix(value, "=?") && strncmp (&value[value_len - 2], "?=", 2) == 0) { /* Looks like an RFC 2047 encoded parameter. */ char decoded[PATH_MAX + 1];