Skip to content

Commit

Permalink
dsync: Fixed potential crash
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
sirainen committed May 11, 2016
1 parent 0d7325f commit 3731267
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/doveadm/dsync/dsync-mailbox-import.c
Expand Up @@ -1683,7 +1683,7 @@ dsync_mailbox_find_common_uid(struct dsync_mailbox_importer *importer,
(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,
Expand Down

0 comments on commit 3731267

Please sign in to comment.