]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Stricter range checking.
authorBruno Haible <bruno@clisp.org>
Tue, 19 Feb 2002 14:25:13 +0000 (14:25 +0000)
committerBruno Haible <bruno@clisp.org>
Sun, 21 Jun 2009 23:24:00 +0000 (01:24 +0200)
lib/ChangeLog
lib/utf8-ucs4.h

index d024d822513fd98b5ea84c3062c69ffa7b62365d..60021165e60ac318a5e384b383fca99b109c778b 100644 (file)
@@ -1,3 +1,7 @@
+2002-02-17  Bruno Haible  <bruno@clisp.org>
+
+       * utf8-ucs4.h (u8_mbtouc_aux): Stricter range checking.
+
 2002-02-15  Bruno Haible  <bruno@clisp.org>
 
        * config.charset [msdosdjgpp]: For Russian, use CP866.
index f39c9c5e2aef4f8d77bf257da0fa6a5dff2937f2..a3f28834b4165821887764f6bf5723145336d136 100644 (file)
@@ -1,5 +1,5 @@
 /* Conversion UTF-8 to UCS-4.
-   Copyright (C) 2001 Free Software Foundation, Inc.
+   Copyright (C) 2001-2002 Free Software Foundation, Inc.
    Written by Bruno Haible <haible@clisp.cons.org>, 2001.
 
 This program is free software; you can redistribute it and/or modify
@@ -84,7 +84,11 @@ u8_mbtouc_aux (puc, s, n)
             {
               if ((s[1] ^ 0x80) < 0x40 && (s[2] ^ 0x80) < 0x40
                   && (s[3] ^ 0x80) < 0x40
-                  && (c >= 0xf1 || s[1] >= 0x90))
+                  && (c >= 0xf1 || s[1] >= 0x90)
+#if 1
+                  && (c < 0xf4 || (c == 0xf4 && s[1] < 0x90))
+#endif
+                 )
                 {
                   *puc = ((unsigned int) (c & 0x07) << 18)
                          | ((unsigned int) (s[1] ^ 0x80) << 12)