mail_index_map_copy_hdr(map, hdr);
map->hdr_base = map->hdr_copy_buf->data;
+ i_assert(map->hdr_copy_buf->used == map->hdr.header_size);
return 1;
}
buffer_write(map->hdr_copy_buf, ext->hdr_offset,
&new_modseq_hdr, sizeof(new_modseq_hdr));
map->hdr_base = map->hdr_copy_buf->data;
+ i_assert(map->hdr_copy_buf->used == map->hdr.header_size);
}
}
memset(buffer_get_space_unsafe(map->hdr_copy_buf, ext->hdr_offset,
ext->hdr_size), 0, ext->hdr_size);
map->hdr_base = map->hdr_copy_buf->data;
+ i_assert(map->hdr_copy_buf->used == map->hdr.header_size);
for (seq = 1; seq <= view->map->rec_map->records_count; seq++) {
rec = MAIL_INDEX_REC_AT_SEQ(view->map, seq);
buffer_write(map->hdr_copy_buf, ext->hdr_offset + offset, data, size);
map->hdr_base = map->hdr_copy_buf->data;
+ i_assert(map->hdr_copy_buf->used == map->hdr.header_size);
if (ext->index_idx == ctx->view->index->modseq_ext_id)
mail_index_modseq_hdr_update(ctx->modseq_ctx);
buffer_copy(map->hdr_copy_buf, ext->hdr_offset, buf, 0, buf->used);
map->hdr_base = map->hdr_copy_buf->data;
+ i_assert(map->hdr_copy_buf->used == map->hdr.header_size);
if (mail_index_map_parse_keywords(map) < 0)
i_panic("Keyword update corrupted keywords header");
buffer_write(map->hdr_copy_buf, u->offset, u + 1, u->size);
map->hdr_base = map->hdr_copy_buf->data;
+ i_assert(map->hdr_copy_buf->used == map->hdr.header_size);
/* @UNSAFE */
if ((uint32_t)(u->offset + u->size) <= sizeof(map->hdr)) {