]> diplodocus.org Git - nmh/commitdiff
fix_filename_param(): Replace strncmp() with HasSuffix().
authorRalph Corderoy <ralph@inputplus.co.uk>
Sun, 23 Oct 2016 23:15:33 +0000 (00:15 +0100)
committerRalph Corderoy <ralph@inputplus.co.uk>
Mon, 24 Oct 2016 09:18:56 +0000 (10:18 +0100)
uip/mhfixmsg.c

index 0c5c2ce..b4e8dc7 100644 (file)
@@ -2527,7 +2527,7 @@ fix_filename_param (char *name, char *value, PM *first_pm, PM *last_pm) {
 
     if (((value_len = strlen (value)) > 0)  &&
         HasPrefix(value, "=?") &&
-        strncmp (&value[value_len - 2], "?=", 2) == 0) {
+        HasSuffix(value, "?=")) {
         /* Looks like an RFC 2047 encoded parameter. */
         char decoded[PATH_MAX + 1];