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

dovecot at dovecot.org dovecot at dovecot.org
Sun Sep 7 20:34:24 EEST 2008


details:   http://hg.dovecot.org/dovecot-1.2/rev/3e21ec854acc
changeset: 8170:3e21ec854acc
user:      Timo Sirainen <tss at iki.fi>
date:      Sun Sep 07 20:03:00 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 cb01142bb9e8 -r 3e21ec854acc src/lib-mail/message-date.c
--- a/src/lib-mail/message-date.c	Sun Sep 07 19:50:23 2008 +0300
+++ b/src/lib-mail/message-date.c	Sun Sep 07 20:03:00 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