aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-mime-utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'camel/camel-mime-utils.c')
-rw-r--r--camel/camel-mime-utils.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/camel/camel-mime-utils.c b/camel/camel-mime-utils.c
index bba18017d9..d787559710 100644
--- a/camel/camel-mime-utils.c
+++ b/camel/camel-mime-utils.c
@@ -3421,13 +3421,20 @@ header_raw_check_mailing_list(struct _header_raw **list)
continue;
}
-
- v = header_raw_find(list, mail_list_magic[i].name, NULL);
- if (v != NULL && regexec(&pattern, v, 2, match, 0) == 0 && match[1].rm_so != -1) {
- regfree(&pattern);
- return g_strndup(v+match[1].rm_so, match[1].rm_eo-match[1].rm_so);
+
+ v = header_raw_find (list, mail_list_magic[i].name, NULL);
+ if (v != NULL && regexec (&pattern, v, 2, match, 0) == 0 && match[1].rm_so != -1) {
+ const char *mlist, *mlend;
+
+ regfree (&pattern);
+ mlist = v + match[1].rm_so;
+ mlend = v + match[1].rm_eo;
+ if (*mlist == '<')
+ mlist++;
+
+ return g_strndup (mlist, mlend - mlist);
}
- regfree(&pattern);
+ regfree (&pattern);
}
return NULL;