]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
MAIL_INDEX_TRANSACTION_FLAG_AVOID_FLAG_UPDATES: Don't crash if trying to add
authorTimo Sirainen <tss@iki.fi>
Fri, 14 Mar 2008 09:56:37 +0000 (11:56 +0200)
committerTimo Sirainen <tss@iki.fi>
Fri, 14 Mar 2008 09:56:37 +0000 (11:56 +0200)
keywords to newly added messages.

--HG--
branch : HEAD

src/lib-index/mail-index-transaction.c

index 952bb174c7ce3d55bc71f12cd8c49ef052e9eb3e..a999a982d3fb57571bf274b6de913b00d1273bcd 100644 (file)
@@ -1339,7 +1339,8 @@ keyword_update_has_changes(struct mail_index_transaction *t, uint32_t seq,
        bool found;
 
        t_array_init(&existing, 32);
-       mail_index_lookup_keywords(t->view, seq, &existing);
+       if (seq < t->first_new_seq)
+               mail_index_lookup_keywords(t->view, seq, &existing);
        existing_idx = array_get(&existing, &existing_count);
 
        if (modify_type == MODIFY_REPLACE && existing_count != keywords->count)