dovecot-1.2: imap: FETCH BODY[HEADER.FIELDS (..)] may have tried...

dovecot at dovecot.org dovecot at dovecot.org
Mon Aug 29 06:47:24 EEST 2011


details:   http://hg.dovecot.org/dovecot-1.2/rev/02c2ac9ddf8c
changeset: 9649:02c2ac9ddf8c
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Aug 29 06:46:53 2011 +0300
description:
imap: FETCH BODY[HEADER.FIELDS (..)] may have tried to fetch garbage field names.
Such situations were quite likely to cause a crash though.

diffstat:

 src/imap/imap-fetch-body.c |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (13 lines):

diff -r 32fe996d3c99 -r 02c2ac9ddf8c src/imap/imap-fetch-body.c
--- a/src/imap/imap-fetch-body.c	Wed Mar 09 20:22:52 2011 +0200
+++ b/src/imap/imap-fetch-body.c	Mon Aug 29 06:46:53 2011 +0300
@@ -781,7 +781,8 @@
 
 		if (i != 0)
 			str_append_c(str, ' ');
-		arr[i] = t_str_ucase(IMAP_ARG_STR(&args[i]));
+		arr[i] = p_strdup(ctx->cmd->pool,
+				  t_str_ucase(IMAP_ARG_STR(&args[i])));
 
 		if (args[i].type == IMAP_ARG_ATOM)
 			str_append(str, arr[i]);


More information about the dovecot-cvs mailing list