dovecot-1.2: rfc822_parse_phrase(): Don't read outside data boun...

dovecot at dovecot.org dovecot at dovecot.org
Fri Jul 18 16:21:20 EEST 2008


details:   http://hg.dovecot.org/dovecot-1.2/rev/289593cceb58
changeset: 8009:289593cceb58
user:      Timo Sirainen <tss at iki.fi>
date:      Fri Jul 18 16:21:04 2008 +0300
description:
rfc822_parse_phrase(): Don't read outside data boundaries if input is empty.

diffstat:

1 file changed, 2 insertions(+)
src/lib-mail/rfc822-parser.c |    2 ++

diffs (12 lines):

diff -r 1d209ee7eead -r 289593cceb58 src/lib-mail/rfc822-parser.c
--- a/src/lib-mail/rfc822-parser.c	Fri Jul 18 13:52:27 2008 +0300
+++ b/src/lib-mail/rfc822-parser.c	Fri Jul 18 16:21:04 2008 +0300
@@ -262,6 +262,8 @@ int rfc822_parse_phrase(struct rfc822_pa
 	   obs-phrase = word *(word / "." / CFWS)
 	*/
 
+	if (ctx->data == ctx->end)
+		return 0;
 	if (*ctx->data == '.')
 		return -1;
 


More information about the dovecot-cvs mailing list