[dovecot-cvs] dovecot/src/lib-mail message-decoder.c,1.5,1.6
tss at dovecot.org
tss at dovecot.org
Sun Mar 25 21:26:56 EEST 2007
Update of /var/lib/cvs/dovecot/src/lib-mail
In directory talvi:/tmp/cvs-serv5811
Modified Files:
message-decoder.c
Log Message:
Don't try to access output variable's contents. They are undefined at least
in the first call.
Index: message-decoder.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-mail/message-decoder.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- message-decoder.c 15 Dec 2006 16:55:41 -0000 1.5
+++ message-decoder.c 25 Mar 2007 18:26:53 -0000 1.6
@@ -26,6 +26,8 @@
#define MAX_TRANSLATION_BUF_SIZE 10
struct message_decoder_context {
+ struct message_part *prev_part;
+
struct message_header_line hdr;
buffer_t *buf, *buf2;
@@ -318,7 +320,7 @@
struct message_block *input,
struct message_block *output)
{
- if (input->part != output->part) {
+ if (input->part != ctx->prev_part) {
/* MIME part changed. */
i_free_and_null(ctx->content_charset);
ctx->content_type = CONTENT_TYPE_BINARY;
@@ -327,6 +329,7 @@
}
output->part = input->part;
+ ctx->prev_part = input->part;
if (input->hdr != NULL)
return message_decode_header(ctx, input->hdr, output);
More information about the dovecot-cvs
mailing list