From a948375ba54e1bf168af15ac9dd7cc3c46ad4a6a Mon Sep 17 00:00:00 2001
From: Stephan Bosch <stephan@rename-it.nl>
Date: Sat, 26 Nov 2011 11:29:07 +0100
Subject: [PATCH] lib-sieve: fixed bug caused by last change to rfc2822 header
 verification.

---
 src/lib-sieve/rfc2822.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/lib-sieve/rfc2822.c b/src/lib-sieve/rfc2822.c
index 09dc32f59..4ec3645b0 100644
--- a/src/lib-sieve/rfc2822.c
+++ b/src/lib-sieve/rfc2822.c
@@ -41,8 +41,8 @@ bool rfc2822_header_field_name_verify
 bool rfc2822_header_field_body_verify
 (const char *field_body, unsigned int len, bool allow_crlf, bool allow_utf8)
 {
-	const char *p = field_body;
-	const char *pend = p + len;
+	const unsigned char *p = (const unsigned char *)field_body;
+	const unsigned char *pend = p + len;
 	bool is8bit = FALSE;
 
 	/* RFC5322:
@@ -60,7 +60,7 @@ bool rfc2822_header_field_body_verify
 		if ( (*p == '\r' || *p == '\n') && !allow_crlf )
 			return FALSE;
 
-		if ( !is8bit && ((unsigned char)*p) > 127 ) {
+		if ( !is8bit && *p > 127 ) {
 			if ( !allow_utf8 )
 				return FALSE;
 
-- 
GitLab