[dovecot-cvs] dovecot/src/lib-index mail-index-transaction.c, 1.22,
1.23
cras at dovecot.org
cras at dovecot.org
Sat Sep 11 21:13:02 EEST 2004
Update of /var/lib/cvs/dovecot/src/lib-index
In directory talvi:/tmp/cvs-serv31100/lib-index
Modified Files:
mail-index-transaction.c
Log Message:
added asserts
Index: mail-index-transaction.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-index/mail-index-transaction.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- mail-index-transaction.c 11 Sep 2004 16:18:59 -0000 1.22
+++ mail-index-transaction.c 11 Sep 2004 18:13:00 -0000 1.23
@@ -595,6 +595,10 @@
{
struct mail_index_record *rec;
+ i_assert(seq > 0 &&
+ (seq <= mail_index_view_get_message_count(t->view) ||
+ seq <= t->last_new_seq));
+
if (file_seq != t->last_cache_file_seq) {
mail_index_transaction_reset_cache_updates(t);
t->last_cache_file_seq = file_seq;
@@ -619,6 +623,10 @@
const void *p;
size_t pos;
+ i_assert(seq > 0 &&
+ (seq <= mail_index_view_get_message_count(t->view) ||
+ seq <= t->last_new_seq));
+
if (t->cache_updates == NULL)
return FALSE;
@@ -648,6 +656,9 @@
buffer_t **buf;
const struct mail_index_extra_record_info *einfo;
+ i_assert(seq > 0 &&
+ (seq <= mail_index_view_get_message_count(t->view) ||
+ seq <= t->last_new_seq));
i_assert(data_id < index->extra_infos->used / sizeof(*einfo));
einfo = index->extra_infos->data;
More information about the dovecot-cvs
mailing list