From: Kenichi Handa Date: Fri, 27 Feb 2009 00:49:09 +0000 (+0000) Subject: (read_escape): Signal an error for invalid \UXXXXXXXX. X-Git-Tag: emacs-pretest-23.0.92~431 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a808f22d62942d8106e05ea685f43e80b682df49;p=emacs.git (read_escape): Signal an error for invalid \UXXXXXXXX. --- diff --git a/src/ChangeLog b/src/ChangeLog index 8c2f33b899e..1c1dc7dde72 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2009-02-27 Kenichi Handa + + * lread.c (read_escape): Signal an error for invalid \UXXXXXXXX. + 2009-02-27 Chong Yidong * font.c (font_style_to_value): Set value for unknown symbols to diff --git a/src/lread.c b/src/lread.c index 063adba1d9a..e4ba5229e20 100644 --- a/src/lread.c +++ b/src/lread.c @@ -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; }