Mercurial > dovecot > core-2.2
changeset 20262:1f4e2c3a8512
dsync: Fixed potential crash
This seems to be possible with dsync_mailbox_find_common_expunged_uid() ->
dsync_mailbox_common_uid_found() -> dsync_mailbox_rewind_search() -> following
search doesn't find anything.
author | Timo Sirainen <timo.sirainen@dovecot.fi> |
---|---|
date | Wed, 11 May 2016 05:19:14 -0400 |
parents | 3edc9022b42f |
children | b85badda00af |
files | src/doveadm/dsync/dsync-mailbox-import.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/doveadm/dsync/dsync-mailbox-import.c Tue May 03 19:42:08 2016 +0300 +++ b/src/doveadm/dsync/dsync-mailbox-import.c Wed May 11 05:19:14 2016 -0400 @@ -1688,7 +1688,7 @@ (void)dsync_mailbox_find_common_expunged_uid(importer, change, result_r); } *result_r = t_strdup_printf("%s (next local mail UID=%u)", - *result_r, importer->cur_mail->uid); + *result_r, importer->cur_mail == NULL ? 0 : importer->cur_mail->uid); } int dsync_mailbox_import_change(struct dsync_mailbox_importer *importer,