[dovecot-cvs] dovecot/src/lib-storage/index/maildir
maildir-keywords.c, 1.2, 1.3 maildir-save.c, 1.63,
1.64 maildir-sync.c, 1.71, 1.72 maildir-uidlist.c, 1.42, 1.43
cras at dovecot.org
cras at dovecot.org
Sat Jan 14 20:47:55 EET 2006
- Previous message: [dovecot-cvs] dovecot/src/lib-storage/index/dbox dbox-file.c, 1.3,
1.4 dbox-list.c, 1.2, 1.3 dbox-save.c, 1.2,
1.3 dbox-sync-expunge.c, 1.4, 1.5 dbox-sync.c, 1.4,
1.5 dbox-uidlist.c, 1.12, 1.13
- Next message: [dovecot-cvs]
dovecot/src/lib-storage/index/mbox istream-raw-mbox.c, 1.38,
1.39 mbox-file.c, 1.14, 1.15 mbox-list.c, 1.33,
1.34 mbox-mail.c, 1.31, 1.32 mbox-save.c, 1.90,
1.91 mbox-storage.c, 1.133, 1.134 mbox-sync-parse.c, 1.48,
1.49 mbox-sync-rewrite.c, 1.60, 1.61 mbox-sync.c, 1.179, 1.180
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /var/lib/cvs/dovecot/src/lib-storage/index/maildir
In directory talvi:/tmp/cvs-serv16037/lib-storage/index/maildir
Modified Files:
maildir-keywords.c maildir-save.c maildir-sync.c
maildir-uidlist.c
Log Message:
deinit, unref, destroy, close, free, etc. functions now take a pointer to
their data pointer, and set it to NULL. This makes double-frees less likely
to cause security holes.
Index: maildir-keywords.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/maildir/maildir-keywords.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- maildir-keywords.c 4 Jul 2005 11:32:26 -0000 1.2
+++ maildir-keywords.c 14 Jan 2006 18:47:50 -0000 1.3
@@ -137,7 +137,7 @@
strp = array_idx_modifyable(&mk->list, idx);
*strp = new_name;
}
- i_stream_unref(input);
+ i_stream_unref(&input);
if (close(fd) < 0) {
mail_storage_set_critical(STORAGE(mk->mbox->storage),
Index: maildir-save.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/maildir/maildir-save.c,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -d -r1.63 -r1.64
--- maildir-save.c 13 Jan 2006 20:26:35 -0000 1.63
+++ maildir-save.c 14 Jan 2006 18:47:50 -0000 1.64
@@ -159,7 +159,7 @@
MAIL_STORAGE_FLAG_SAVE_CRLF) != 0 ?
o_stream_create_crlf(default_pool, output) :
o_stream_create_lf(default_pool, output);
- o_stream_unref(output);
+ o_stream_unref(&output);
flags &= ~MAIL_RECENT;
if (mbox->ibox.keep_recent)
@@ -255,8 +255,7 @@
}
output_errno = ctx->output->stream_errno;
- o_stream_unref(ctx->output);
- ctx->output = NULL;
+ o_stream_unref(&ctx->output);
/* FIXME: when saving multiple messages, we could get better
performance if we left the fd open and fsync()ed it later */
Index: maildir-sync.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/maildir/maildir-sync.c,v
retrieving revision 1.71
retrieving revision 1.72
diff -u -d -r1.71 -r1.72
--- maildir-sync.c 13 Jan 2006 20:26:35 -0000 1.71
+++ maildir-sync.c 14 Jan 2006 18:47:50 -0000 1.72
@@ -840,7 +840,7 @@
void maildir_sync_index_abort(struct maildir_index_sync_context *sync_ctx)
{
- mail_index_sync_rollback(sync_ctx->sync_ctx);
+ mail_index_sync_rollback(&sync_ctx->sync_ctx);
maildir_keywords_sync_deinit(sync_ctx->keywords_sync_ctx);
i_free(sync_ctx);
}
@@ -955,7 +955,7 @@
trans, &keywords);
mail_index_update_keywords(trans, seq,
MODIFY_REPLACE, kw);
- mail_index_keywords_free(kw);
+ mail_index_keywords_free(&kw);
}
continue;
}
@@ -1057,7 +1057,7 @@
trans, &keywords);
mail_index_update_keywords(trans, seq,
MODIFY_REPLACE, kw);
- mail_index_keywords_free(kw);
+ mail_index_keywords_free(&kw);
}
}
maildir_uidlist_iter_deinit(iter);
@@ -1137,19 +1137,19 @@
}
if (ret < 0) {
- mail_index_transaction_rollback(trans);
- mail_index_sync_rollback(sync_ctx->sync_ctx);
+ mail_index_transaction_rollback(&trans);
+ mail_index_sync_rollback(&sync_ctx->sync_ctx);
} else {
uint32_t seq;
uoff_t offset;
- if (mail_index_transaction_commit(trans, &seq, &offset) < 0)
+ if (mail_index_transaction_commit(&trans, &seq, &offset) < 0)
ret = -1;
else if (seq != 0) {
mbox->ibox.commit_log_file_seq = seq;
mbox->ibox.commit_log_file_offset = offset;
}
- if (mail_index_sync_commit(sync_ctx->sync_ctx) < 0)
+ if (mail_index_sync_commit(&sync_ctx->sync_ctx) < 0)
ret = -1;
}
maildir_keywords_sync_deinit(sync_ctx->keywords_sync_ctx);
Index: maildir-uidlist.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/maildir/maildir-uidlist.c,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -d -r1.42 -r1.43
--- maildir-uidlist.c 13 Jan 2006 20:26:35 -0000 1.42
+++ maildir-uidlist.c 14 Jan 2006 18:47:50 -0000 1.43
@@ -332,7 +332,7 @@
uidlist->last_mtime = 0;
}
- i_stream_unref(input);
+ i_stream_unref(&input);
uidlist->initial_read = TRUE;
return ret;
}
- Previous message: [dovecot-cvs] dovecot/src/lib-storage/index/dbox dbox-file.c, 1.3,
1.4 dbox-list.c, 1.2, 1.3 dbox-save.c, 1.2,
1.3 dbox-sync-expunge.c, 1.4, 1.5 dbox-sync.c, 1.4,
1.5 dbox-uidlist.c, 1.12, 1.13
- Next message: [dovecot-cvs]
dovecot/src/lib-storage/index/mbox istream-raw-mbox.c, 1.38,
1.39 mbox-file.c, 1.14, 1.15 mbox-list.c, 1.33,
1.34 mbox-mail.c, 1.31, 1.32 mbox-save.c, 1.90,
1.91 mbox-storage.c, 1.133, 1.134 mbox-sync-parse.c, 1.48,
1.49 mbox-sync-rewrite.c, 1.60, 1.61 mbox-sync.c, 1.179, 1.180
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the dovecot-cvs
mailing list