dovecot-1.1: rfc822_parse_phrase(): Don't read outside data boun...
dovecot at dovecot.org
dovecot at dovecot.org
Fri Jul 18 16:23:12 EEST 2008
details: http://hg.dovecot.org/dovecot-1.1/rev/df94d2155e4b
changeset: 7757:df94d2155e4b
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 ecad3f2402a9 -r df94d2155e4b 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