*/
static int
fix_filename_param (char *name, char *value, PM *first_pm, PM *last_pm) {
- size_t value_len;
int fixed = 0;
- if (((value_len = strlen (value)) > 0) &&
- strncmp (value, "=?", 2) == 0 &&
- strncmp (&value[value_len - 2], "?=", 2) == 0) {
+ if (HasPrefix(value, "=?") && HasSuffix(value, "?=")) {
/* Looks like an RFC 2047 encoded parameter. */
char decoded[PATH_MAX + 1];