dovecot-sieve-1.1: Don't assert-crash if unfolding a header stri...

dovecot at dovecot.org dovecot at dovecot.org
Thu Jun 12 09:11:48 EEST 2008


details:   http://hg.dovecot.org/dovecot-sieve-1.1/rev/d7fdee930d07
changeset: 60:d7fdee930d07
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Jun 12 09:11:45 2008 +0300
description:
Don't assert-crash if unfolding a header string that ends with LF.

diffstat:

1 file changed, 2 insertions(+)
src/sieve-cmu.c |    2 ++

diffs (12 lines):

diff -r 56dcc0a823af -r d7fdee930d07 src/sieve-cmu.c
--- a/src/sieve-cmu.c	Fri Jun 06 16:56:42 2008 +0300
+++ b/src/sieve-cmu.c	Thu Jun 12 09:11:45 2008 +0300
@@ -85,6 +85,8 @@ static const char *unfold_header(const c
 		if (str[i] == '\n') {
 			new_str[j++] = ' ';
 			i++;
+			if (str[i] == '\0')
+				break;
 			i_assert(str[i] == ' ' || str[i] == '\t');
 		} else {
 			new_str[j++] = str[i];


More information about the dovecot-cvs mailing list