]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-index: Fix crash in mail_transaction_log_view_set_all() error handling
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Mon, 22 May 2017 07:13:21 +0000 (10:13 +0300)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Wed, 24 May 2017 15:10:42 +0000 (18:10 +0300)
src/lib-index/mail-transaction-log-view.c

index 6fa4fcb9975d615767b9431ef2a8dd25e9f2c1cc..980060c4ef1c9fede8578fc8d5806731516f752e 100644 (file)
@@ -373,9 +373,9 @@ int mail_transaction_log_view_set_all(struct mail_transaction_log_view *view)
        if (first == NULL) {
                /* index wasn't reset after corruption was found */
                i_assert(reason != NULL);
-               mail_index_set_error(file->log->index,
+               mail_index_set_error(view->log->index,
                        "Failed to map transaction log %s for all-view: %s",
-                       file->filepath, reason);
+                       view->log->filepath, reason);
                return -1;
        }
 
@@ -400,9 +400,9 @@ int mail_transaction_log_view_set_all(struct mail_transaction_log_view *view)
 
        if (mail_transaction_log_file_get_highest_modseq_at(view->cur,
                        view->cur_offset, &view->prev_modseq, &reason) < 0) {
-               mail_index_set_error(file->log->index,
+               mail_index_set_error(view->log->index,
                        "Failed to get modseq in %s for all-view: %s",
-                       file->filepath, reason);
+                       view->log->filepath, reason);
                return -1;
        }
        return 0;