[dovecot-cvs] dovecot/src/lib-storage/index index-mail-headers.c,
1.59, 1.59.2.1
cras at dovecot.org
cras at dovecot.org
Sat Jun 17 23:15:12 EEST 2006
Update of /var/lib/cvs/dovecot/src/lib-storage/index
In directory talvi:/tmp/cvs-serv23098
Modified Files:
Tag: branch_1_0
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.59
retrieving revision 1.59.2.1
diff -u -d -r1.59 -r1.59.2.1
--- index-mail-headers.c 26 Feb 2006 10:05:15 -0000 1.59
+++ index-mail-headers.c 17 Jun 2006 20:15:09 -0000 1.59.2.1
@@ -353,9 +353,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