aboutsummaryrefslogtreecommitdiff
path: root/mail
diff options
context:
space:
mode:
authorAdam Weinberger <adamw@FreeBSD.org>2017-06-19 21:16:11 +0000
committerAdam Weinberger <adamw@FreeBSD.org>2017-06-19 21:16:11 +0000
commit627bbb2235cd5e378669a27040c6bc4433c54ceb (patch)
treec4b7cad3f47aca51f06b9fa808cc52be8926635f /mail
parent939d53249386aef0cbf7d06ffca7b7f38f8840f4 (diff)
downloadports-627bbb2235cd5e378669a27040c6bc4433c54ceb.tar.gz
ports-627bbb2235cd5e378669a27040c6bc4433c54ceb.zip
Add an upstream patch to fix a potential crash or a scenario where
mail is mis-marked as corrupted. Submitted by: arved Obtained from: https://github.com/dovecot/core/commit/8a5fe0c06f48b202a5f1d3dd49f7ed7ed92d64ae MFH: 2017Q2
Notes
Notes: svn path=/head/; revision=443911
Diffstat (limited to 'mail')
-rw-r--r--mail/dovecot2/Makefile1
-rw-r--r--mail/dovecot2/files/patch-upstream-corrupted_cache_record26
2 files changed, 27 insertions, 0 deletions
diff --git a/mail/dovecot2/Makefile b/mail/dovecot2/Makefile
index cad7fb1ed101..a9c422e8f7af 100644
--- a/mail/dovecot2/Makefile
+++ b/mail/dovecot2/Makefile
@@ -14,6 +14,7 @@
PORTNAME= dovecot
PORTVERSION= 2.2.30.2
+PORTREVISION= 1
CATEGORIES= mail ipv6
MASTER_SITES= https://www.dovecot.org/releases/${PORTVERSION:R:R}/
PKGNAMESUFFIX= 2
diff --git a/mail/dovecot2/files/patch-upstream-corrupted_cache_record b/mail/dovecot2/files/patch-upstream-corrupted_cache_record
new file mode 100644
index 000000000000..70633d3be370
--- /dev/null
+++ b/mail/dovecot2/files/patch-upstream-corrupted_cache_record
@@ -0,0 +1,26 @@
+From 8a5fe0c06f48b202a5f1d3dd49f7ed7ed92d64ae Mon Sep 17 00:00:00 2001
+From: Timo Sirainen <timo.sirainen@dovecot.fi>
+Date: Fri, 9 Jun 2017 14:31:15 +0300
+Subject: [PATCH] lib-storage: Fix setting the correct cache record corrupted
+
+It was mixing UIDs and sequences, so a wrong mail could have been set
+corrupted or it could have crashed with:
+
+Panic: file mail-index-transaction-update.c: line 1018 (mail_index_update_ext): assertion failed: (seq > 0 && (seq <= mail_index_view_get_messages_count(t->view) || seq <= t->last_new_seq))
+---
+ src/lib-storage/mail-storage.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/lib-storage/mail-storage.c b/src/lib-storage/mail-storage.c
+index 067a65bc1..2405161e0 100644
+--- src/lib-storage/mail-storage.c
++++ src/lib-storage/mail-storage.c
+@@ -2754,7 +2754,7 @@ void mail_set_mail_cache_corrupted(struct mail *mail, const char *fmt, ...)
+ va_start(va, fmt);
+
+ T_BEGIN {
+- mail_cache_set_seq_corrupted_reason(cache_view, mail->uid,
++ mail_cache_set_seq_corrupted_reason(cache_view, mail->seq,
+ t_strdup_printf("UID %u: %s",
+ mail->uid,
+ t_strdup_vprintf(fmt, va)));