dovecot: Convert also 0x80..0x9f characters to '?'

dovecot at dovecot.org dovecot at dovecot.org
Sat Sep 15 10:46:29 EEST 2007


details:   http://hg.dovecot.org/dovecot/rev/6d5c3ce9426c
changeset: 6383:6d5c3ce9426c
user:      Timo Sirainen <tss at iki.fi>
date:      Sat Sep 15 10:46:22 2007 +0300
description:
Convert also 0x80..0x9f characters to '?'

diffstat:

1 file changed, 2 insertions(+), 2 deletions(-)
src/lib/str-sanitize.c |    4 ++--

diffs (19 lines):

diff -r 950e34795fbc -r 6d5c3ce9426c src/lib/str-sanitize.c
--- a/src/lib/str-sanitize.c	Sat Sep 15 10:34:08 2007 +0300
+++ b/src/lib/str-sanitize.c	Sat Sep 15 10:46:22 2007 +0300
@@ -9,13 +9,13 @@ void str_sanitize_append(string_t *dest,
 	const char *p;
 
 	for (p = src; *p != '\0'; p++) {
-		if ((unsigned char)*p < 32)
+		if (((unsigned char)*p & 0x7f) < 32)
 			break;
 	}
 
 	str_append_n(dest, src, (size_t)(p - src));
 	for (; *p != '\0' && max_len > 0; p++, max_len--) {
-		if ((unsigned char)*p < 32)
+		if (((unsigned char)*p & 0x7f) < 32)
 			str_append_c(dest, '?');
 		else
 			str_append_c(dest, *p);


More information about the dovecot-cvs mailing list