dovecot-2.0-pigeonhole: Merged concurrent changes.

pigeonhole at rename-it.nl pigeonhole at rename-it.nl
Sun Jan 23 14:43:41 EET 2011


details:   http://hg.rename-it.nl/dovecot-2.0-pigeonhole/rev/2391ec677b35
changeset: 1462:2391ec677b35
user:      Stephan Bosch <stephan at rename-it.nl>
date:      Sun Jan 23 13:40:33 2011 +0100
description:
Merged concurrent changes.

diffstat:

 src/lib-sieve/plugins/enotify/mailto/uri-mailto.c |  19 ++++++++++++-------
 1 files changed, 12 insertions(+), 7 deletions(-)

diffs (44 lines):

diff -r f68dd69a4ac4 -r 2391ec677b35 src/lib-sieve/plugins/enotify/mailto/uri-mailto.c
--- a/src/lib-sieve/plugins/enotify/mailto/uri-mailto.c	Sun Jan 23 13:39:50 2011 +0100
+++ b/src/lib-sieve/plugins/enotify/mailto/uri-mailto.c	Sun Jan 23 13:40:33 2011 +0100
@@ -115,7 +115,7 @@
 	return _qchar_lookup[c];
 }
   
-static inline int _decode_hex_digit(char digit)
+static inline int _decode_hex_digit(unsigned char digit)
 {
 	switch ( digit ) {
 	case '0': case '1': case '2': case '3': case '4': 
@@ -134,20 +134,25 @@
 
 static bool _parse_hex_value(const char **in, char *out)
 {
-	char value;
+	int value, digit;
 		
-	if ( **in == '\0' || (value=_decode_hex_digit(**in)) < 0 )
+	if ( (digit=_decode_hex_digit((unsigned char) **in)) < 0 )
 		return FALSE;
 	
-	*out = value << 4;
+	value = digit << 4;
 	(*in)++;
 	
-	if ( **in == '\0' || (value=_decode_hex_digit(**in)) < 0 )
+	if ( (digit=_decode_hex_digit((unsigned char) **in)) < 0 )
 		return FALSE;	
 
-	*out |= value;
+	value |= digit;
 	(*in)++;
-	return (*out != '\0');	
+
+	if ( value == 0 )
+		return FALSE;
+
+	*out = (char) value;
+	return TRUE;	
 }
 
 /* 


More information about the dovecot-cvs mailing list