From: Axel Rau Date: Mon, 14 Apr 2014 19:02:41 +0000 (+0100) Subject: Update ${utf8clean }. Bug 1401 X-Git-Tag: exim-4_83_RC1~56^2 X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;h=10cc8a1e4c3077eefcb37878990753d1d49cf363;p=user%2Fhenk%2Fcode%2Fexim.git Update ${utf8clean }. Bug 1401 --- diff --git a/src/src/expand.c b/src/src/expand.c index 64a3a86e6..7a3252eaa 100644 --- a/src/src/expand.c +++ b/src/src/expand.c @@ -6189,8 +6189,13 @@ while (*s != 0) } if((c & 0xe0) == 0xc0) /* 2-byte sequence */ { - bytes_left = 1; - codepoint = c & 0x1f; + if(c == 0xc0 || c == 0xc1) /* 0xc0 and 0xc1 are illegal */ + complete = -1; + else + { + bytes_left = 1; + codepoint = c & 0x1f; + } } else if((c & 0xf0) == 0xe0) /* 3-byte sequence */ {