dovecot-1.2-managesieve: Fixed bug in UTF-8 checking of string v...

pigeonhole at rename-it.nl pigeonhole at rename-it.nl
Thu Feb 17 22:18:26 EET 2011


details:   http://hg.rename-it.nl/dovecot-1.2-managesieve/rev/c4d1791a1e5b
changeset: 218:c4d1791a1e5b
user:      Stephan Bosch <stephan at rename-it.nl>
date:      Thu Feb 17 21:18:19 2011 +0100
description:
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 bbf607d16442 -r c4d1791a1e5b src/lib-managesieve/managesieve-parser.c
--- a/src/lib-managesieve/managesieve-parser.c	Mon Oct 04 23:09:37 2010 +0200
+++ b/src/lib-managesieve/managesieve-parser.c	Thu Feb 17 21:18:19 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