]> git.eshelyaron.com Git - emacs.git/commitdiff
(read_escape): Signal an error for invalid \UXXXXXXXX.
authorKenichi Handa <handa@m17n.org>
Fri, 27 Feb 2009 00:49:09 +0000 (00:49 +0000)
committerKenichi Handa <handa@m17n.org>
Fri, 27 Feb 2009 00:49:09 +0000 (00:49 +0000)
src/ChangeLog
src/lread.c

index 8c2f33b899e516f2b106195ab20393c47731d08d..1c1dc7dde72ca03cedb350c453521bf36e1caac5 100644 (file)
@@ -1,3 +1,7 @@
+2009-02-27  Kenichi Handa  <handa@m17n.org>
+
+       * lread.c (read_escape): Signal an error for invalid \UXXXXXXXX.
+
 2009-02-27  Chong Yidong  <cyd@stupidchicken.com>
 
        * font.c (font_style_to_value): Set value for unknown symbols to
index 063adba1d9ac1f98b5e4ff88ecbe4e4cd5a1e416..e4ba5229e203b1de396daa2f30cc92a2855acf9a 100644 (file)
@@ -2205,7 +2205,7 @@ read_escape (readcharfun, stringp)
       /* A Unicode escape. We only permit them in strings and characters,
         not arbitrarily in the source code, as in some other languages.  */
       {
-       int i = 0;
+       unsigned int i = 0;
        int count = 0;
 
        while (++count <= unicode_hex_count)
@@ -2222,7 +2222,8 @@ read_escape (readcharfun, stringp)
                break;
              }
          }
-
+       if (i > 0x10FFFF)
+         error ("Non-Unicode character: 0x%x", i);
        return i;
       }