[dovecot-cvs] dovecot/src/lib-index mail-transaction-log-view.c, 1.25, 1.26

cras at dovecot.org cras at dovecot.org
Fri Sep 10 15:29:40 EEST 2004


Update of /var/lib/cvs/dovecot/src/lib-index
In directory talvi:/tmp/cvs-serv2263/lib-index

Modified Files:
	mail-transaction-log-view.c 
Log Message:
Crashfix with corrupted log files.



Index: mail-transaction-log-view.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-index/mail-transaction-log-view.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- mail-transaction-log-view.c	5 Sep 2004 17:53:45 -0000	1.25
+++ mail-transaction-log-view.c	10 Sep 2004 12:29:38 -0000	1.26
@@ -349,8 +349,9 @@
 		const uint32_t *data_id = data;
 		uint32_t max_data_id;
 
-		max_data_id = view->log->index->map->extra_infos->used /
-			sizeof(struct mail_index_extra_record_info);
+		max_data_id = view->log->index->map->extra_infos == NULL ? 0 :
+			(view->log->index->map->extra_infos->used /
+			 sizeof(struct mail_index_extra_record_info));
 		if (view->max_extra_data_id > max_data_id)
 			max_data_id = view->max_extra_data_id;
 



More information about the dovecot-cvs mailing list