dovecot-1.1: message date parser: Fixed parsing last optional fi...

dovecot at dovecot.org dovecot at dovecot.org
Sun Sep 7 20:33:59 EEST 2008


details:   http://hg.dovecot.org/dovecot-1.1/rev/c2a844e382f2
changeset: 7861:c2a844e382f2
user:      Timo Sirainen <tss at iki.fi>
date:      Sun Sep 07 20:02:37 2008 +0300
description:
message date parser: Fixed parsing last optional fields due to previous rfc822 parser changes.

diffstat:

1 file changed, 2 insertions(+), 1 deletion(-)
src/lib-mail/message-date.c |    3 ++-

diffs (13 lines):

diff -r 38c52536edca -r c2a844e382f2 src/lib-mail/message-date.c
--- a/src/lib-mail/message-date.c	Sun Sep 07 19:50:06 2008 +0300
+++ b/src/lib-mail/message-date.c	Sun Sep 07 20:02:37 2008 +0300
@@ -98,7 +98,8 @@ static int next_token(struct message_dat
 	int ret;
 
 	str_truncate(ctx->str, 0);
-	ret = rfc822_parse_atom(&ctx->parser, ctx->str);
+	ret = ctx->parser.data == ctx->parser.end ? 0 :
+		rfc822_parse_atom(&ctx->parser, ctx->str);
 
 	*value = str_data(ctx->str);
 	*value_len = str_len(ctx->str);


More information about the dovecot-cvs mailing list