dovecot-1.0: rfc822_parse_phrase(): Don't read outside data boun...
dovecot at dovecot.org
dovecot at dovecot.org
Fri Jul 18 16:21:08 EEST 2008
details: http://hg.dovecot.org/dovecot-1.0/rev/f700b7b822f1
changeset: 5563:f700b7b822f1
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 cb5380b2da3b -r f700b7b822f1 src/lib-mail/rfc822-parser.c
--- a/src/lib-mail/rfc822-parser.c Fri Jul 18 13:53:48 2008 +0300
+++ b/src/lib-mail/rfc822-parser.c Fri Jul 18 16:21:04 2008 +0300
@@ -261,6 +261,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