dovecot-2.2: lib-mail: message_parser_parse_next_block() now ful...

dovecot at dovecot.org dovecot at dovecot.org
Thu Jun 12 23:20:43 UTC 2014


details:   http://hg.dovecot.org/dovecot-2.2/rev/d26130954761
changeset: 17475:d26130954761
user:      Timo Sirainen <tss at iki.fi>
date:      Fri Jun 13 01:52:13 2014 +0300
description:
lib-mail: message_parser_parse_next_block() now fully clears block_r to be safe case.
I'm not away of this hitting any bugs, but better to be safe.

diffstat:

 src/lib-mail/message-parser.c |  2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diffs (12 lines):

diff -r 1aca4e8811dc -r d26130954761 src/lib-mail/message-parser.c
--- a/src/lib-mail/message-parser.c	Fri Jun 13 01:35:13 2014 +0300
+++ b/src/lib-mail/message-parser.c	Fri Jun 13 01:52:13 2014 +0300
@@ -1012,6 +1012,8 @@
 	int ret;
 	bool eof = FALSE, full;
 
+	memset(block_r, 0, sizeof(*block_r));
+
 	while ((ret = ctx->parse_next_block(ctx, block_r)) == 0) {
 		ret = message_parser_read_more(ctx, block_r, &full);
 		if (ret == 0) {


More information about the dovecot-cvs mailing list