aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mail/ChangeLog1
-rw-r--r--mail/mail-autofilter.c6
2 files changed, 4 insertions, 3 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 6b80ef7d27..7aedc1924d 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -2,6 +2,7 @@
* mail-autofilter.c (filter_gui_add_from_message): Helper function to add with confirm.
(rule_match_recipients): Dont set real name if its empty for the filter name.
+ (rule_match_subject): was cutting ] off mailing list names.
* message-list.c (on_right_click): Added menu to install vfolders/filters from message.
diff --git a/mail/mail-autofilter.c b/mail/mail-autofilter.c
index 77a851e9b5..4aa246666a 100644
--- a/mail/mail-autofilter.c
+++ b/mail/mail-autofilter.c
@@ -153,9 +153,9 @@ rule_match_subject(RuleContext *context, FilterRule *rule, const char *subject)
s2 = strchr(s, ']');
if (s1 && s2 && s1<s2) {
/* probably a mailing list, match on the mailing list name */
- tmp = alloca(s2-s1+1);
- memcpy(tmp, s1, s2-s1);
- tmp[s2-s1] = 0;
+ tmp = alloca(s2-s1+2);
+ memcpy(tmp, s1, s2-s1+1);
+ tmp[s2-s1+1] = 0;
g_strstrip(tmp);
rule_add_subject(context, rule, tmp);
s = s2+1;