dovecot-2.2: dsync: Fixed crash in earlier patch if node didn't ...

dovecot at dovecot.org dovecot at dovecot.org
Thu Feb 5 17:40:40 UTC 2015


details:   http://hg.dovecot.org/dovecot-2.2/rev/d7defdcfe039
changeset: 18221:d7defdcfe039
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Feb 05 19:40:25 2015 +0200
description:
dsync: Fixed crash in earlier patch if node didn't have a namespace.
This shouldn't have happened except in test-dsync-mailbox-tree-sync, but
easier and safer to fix it here.

diffstat:

 src/doveadm/dsync/dsync-mailbox-tree-sync.c |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r 560043558dd6 -r d7defdcfe039 src/doveadm/dsync/dsync-mailbox-tree-sync.c
--- a/src/doveadm/dsync/dsync-mailbox-tree-sync.c	Thu Feb 05 19:36:29 2015 +0200
+++ b/src/doveadm/dsync/dsync-mailbox-tree-sync.c	Thu Feb 05 19:40:25 2015 +0200
@@ -361,7 +361,7 @@
 					  struct dsync_mailbox_node *node)
 {
 	const char *full_name;
-	unsigned int prefix_len = node->ns->prefix_len;
+	unsigned int prefix_len = node->ns == NULL ? 0 : node->ns->prefix_len;
 
 	if (prefix_len == 0)
 		return FALSE;


More information about the dovecot-cvs mailing list