Mercurial > dovecot > original-hg > dovecot-1.2
changeset 7412:50ebec7bd4c5 HEAD
Expunge handler crashfix
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Wed, 12 Mar 2008 05:27:14 +0200 |
parents | ed147ad1e03e |
children | 5d96b15832fc |
files | src/lib-index/mail-index-sync-ext.c |
diffstat | 1 files changed, 2 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-index/mail-index-sync-ext.c Tue Mar 11 17:25:29 2008 +0200 +++ b/src/lib-index/mail-index-sync-ext.c Wed Mar 12 05:27:14 2008 +0200 @@ -34,11 +34,10 @@ id_map = array_get(&ctx->view->map->ext_id_map, &id_map_count); contexts = array_get_modifiable(&ctx->extra_contexts, &context_count); - i_assert(id_map_count <= rext_count); i_assert(context_count >= rext_count); - for (idx_ext_id = 0; idx_ext_id < rext_count; idx_ext_id++) { - map_ext_id = id_map[idx_ext_id]; + map_ext_id = idx_ext_id >= id_map_count ? (uint32_t)-1 : + id_map[idx_ext_id]; if (rext[idx_ext_id].expunge_handler == NULL || (map_ext_id == (uint32_t)-1 && !rext[idx_ext_id].expunge_handler_call_always))