Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Jun 2017 21:16:11 +0000 (UTC)
From:      Adam Weinberger <adamw@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r443911 - in head/mail/dovecot2: . files
Message-ID:  <201706192116.v5JLGBZ8047043@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: adamw
Date: Mon Jun 19 21:16:11 2017
New Revision: 443911
URL: https://svnweb.freebsd.org/changeset/ports/443911

Log:
  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

Added:
  head/mail/dovecot2/files/patch-upstream-corrupted_cache_record   (contents, props changed)
Modified:
  head/mail/dovecot2/Makefile

Modified: head/mail/dovecot2/Makefile
==============================================================================
--- head/mail/dovecot2/Makefile	Mon Jun 19 21:07:11 2017	(r443910)
+++ head/mail/dovecot2/Makefile	Mon Jun 19 21:16:11 2017	(r443911)
@@ -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

Added: head/mail/dovecot2/files/patch-upstream-corrupted_cache_record
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/mail/dovecot2/files/patch-upstream-corrupted_cache_record	Mon Jun 19 21:16:11 2017	(r443911)
@@ -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)));



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201706192116.v5JLGBZ8047043>