[dovecot-cvs] dovecot/src/lib-storage/index index-mail-headers.c,
1.61, 1.62
cras at dovecot.org
cras at dovecot.org
Sat Jun 17 23:15:13 EEST 2006
Update of /var/lib/cvs/dovecot/src/lib-storage/index
In directory talvi:/tmp/cvs-serv3984
Modified Files:
index-mail-headers.c
Log Message:
Crashfix if mail's data is fetched in specific order (I'm not sure how to
reproduce this though, but the crash has happened to others)
Index: index-mail-headers.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/index-mail-headers.c,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -d -r1.61 -r1.62
--- index-mail-headers.c 9 May 2006 11:57:37 -0000 1.61
+++ index-mail-headers.c 17 Jun 2006 20:15:10 -0000 1.62
@@ -352,9 +352,12 @@
index_mail_parse_header_init(mail, headers);
- if (data->parts == NULL && data->parser_ctx == NULL) {
+ if (data->parser_ctx == NULL && (data->parts == NULL ||
+ data->save_bodystructure_header)) {
/* initialize bodystructure parsing in case we read the whole
message. */
+ if (data->parser_ctx != NULL)
+ (void)message_parser_deinit(&mail->data.parser_ctx);
data->parser_ctx =
message_parser_init(mail->data_pool, data->stream);
message_parser_parse_header(data->parser_ctx, &data->hdr_size,
More information about the dovecot-cvs
mailing list