dovecot-2.0-pigeonhole: lib-sieve: variables extension: Fixed co...

pigeonhole at rename-it.nl pigeonhole at rename-it.nl
Thu Sep 26 23:26:57 EEST 2013


details:   http://hg.rename-it.nl/dovecot-2.0-pigeonhole/rev/ded0c5a467aa
changeset: 1564:ded0c5a467aa
user:      Stephan Bosch <stephan at rename-it.nl>
date:      Thu Sep 26 22:26:48 2013 +0200
description:
lib-sieve: variables extension: Fixed code corruption bug in 'set' command.

diffstat:

 src/lib-sieve/plugins/variables/cmd-set.c |  20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diffs (31 lines):

diff -r f1dbb8d227fe -r ded0c5a467aa src/lib-sieve/plugins/variables/cmd-set.c
--- a/src/lib-sieve/plugins/variables/cmd-set.c	Thu Sep 26 22:24:07 2013 +0200
+++ b/src/lib-sieve/plugins/variables/cmd-set.c	Thu Sep 26 22:26:48 2013 +0200
@@ -316,17 +316,17 @@
 		str_truncate(value, EXT_VARIABLES_MAX_VARIABLE_SIZE);
 
 	/* Apply modifiers if necessary (sorted during code generation already) */
-	if ( str_len(value) > 0 ) {
-		for ( i = 0; i < mdfs; i++ ) {
-			string_t *new_value;
-			struct sieve_variables_modifier modf;
-				
-			if ( !ext_variables_opr_modifier_read(renv, address, &modf) ) {
-				value = NULL;
-				ret = SIEVE_EXEC_BIN_CORRUPT;
-				break;
-			}
+	for ( i = 0; i < mdfs; i++ ) {
+		string_t *new_value;
+		struct sieve_variables_modifier modf;
 			
+		if ( !ext_variables_opr_modifier_read(renv, address, &modf) ) {
+			value = NULL;
+			ret = SIEVE_EXEC_BIN_CORRUPT;
+			break;
+		}
+
+		if ( str_len(value) > 0 ) {			
 			if ( modf.def != NULL && modf.def->modify != NULL ) {
 				if ( !modf.def->modify(value, &new_value) ) {
 					value = NULL;


More information about the dovecot-cvs mailing list