dovecot-2.0-pigeonhole: ManageSieve: fixed bug in UTF-8 checking...

pigeonhole at rename-it.nl pigeonhole at rename-it.nl
Thu Feb 17 22:12:51 EET 2011


details:   http://hg.rename-it.nl/dovecot-2.0-pigeonhole/rev/ae42f8dd3c7e
changeset: 1476:ae42f8dd3c7e
user:      Stephan Bosch <stephan at rename-it.nl>
date:      Thu Feb 17 21:12:44 2011 +0100
description:
ManageSieve: fixed bug in UTF-8 checking of string values.

diffstat:

 src/lib-managesieve/managesieve-parser.c |  3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diffs (17 lines):

diff -r a23274a90b80 -r ae42f8dd3c7e src/lib-managesieve/managesieve-parser.c
--- a/src/lib-managesieve/managesieve-parser.c	Sun Feb 13 10:27:11 2011 +0100
+++ b/src/lib-managesieve/managesieve-parser.c	Thu Feb 17 21:12:44 2011 +0100
@@ -318,12 +318,11 @@
 				return FALSE;
 			}
 
-			i++;
 			utf8_len--;
 	
 			/* Parse the series of UTF8_1 characters */
 			for (; utf8_len > 0; utf8_len--, i++ ) {  
-				if (!IS_UTF8_1(data[i])) {
+				if (!IS_UTF8_1(data[i+1])) {
 					parser->error = "String contains invalid UTF-8 character.";
 			    return FALSE;
 				}


More information about the dovecot-cvs mailing list