[exim-cvs] Update ${utf8clean }. Bug 1401

Pàgina inicial
Delete this message
Reply to this message
Autor: Exim Git Commits Mailing List
Data:  
A: exim-cvs
Assumpte: [exim-cvs] Update ${utf8clean }. Bug 1401
Gitweb: http://git.exim.org/exim.git/commitdiff/10cc8a1e4c3077eefcb37878990753d1d49cf363
Commit:     10cc8a1e4c3077eefcb37878990753d1d49cf363
Parent:     246976987ab3541336450030876b8650e786c581
Author:     Axel Rau <axel.rau@???>
AuthorDate: Mon Apr 14 20:02:41 2014 +0100
Committer:  Jeremy Harris <jgh146exb@???>
CommitDate: Mon Apr 14 20:02:41 2014 +0100


    Update ${utf8clean }.  Bug 1401
---
 src/src/expand.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)


diff --git a/src/src/expand.c b/src/src/expand.c
index 64a3a86..7a3252e 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 */
           {