diff options
| author | Kenichi Handa | 2009-02-27 00:49:09 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2009-02-27 00:49:09 +0000 |
| commit | a808f22d62942d8106e05ea685f43e80b682df49 (patch) | |
| tree | c9ada0a843794ff7bda7fc8be9e0b566e9fa7911 /src | |
| parent | b61137ea4bcc42d0fa3659ac7f3b0ef57c622444 (diff) | |
| download | emacs-a808f22d62942d8106e05ea685f43e80b682df49.tar.gz emacs-a808f22d62942d8106e05ea685f43e80b682df49.zip | |
(read_escape): Signal an error for invalid \UXXXXXXXX.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 4 | ||||
| -rw-r--r-- | src/lread.c | 5 |
2 files changed, 7 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 8c2f33b899e..1c1dc7dde72 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2009-02-27 Kenichi Handa <handa@m17n.org> | ||
| 2 | |||
| 3 | * lread.c (read_escape): Signal an error for invalid \UXXXXXXXX. | ||
| 4 | |||
| 1 | 2009-02-27 Chong Yidong <cyd@stupidchicken.com> | 5 | 2009-02-27 Chong Yidong <cyd@stupidchicken.com> |
| 2 | 6 | ||
| 3 | * font.c (font_style_to_value): Set value for unknown symbols to | 7 | * 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) | |||
| 2205 | /* A Unicode escape. We only permit them in strings and characters, | 2205 | /* A Unicode escape. We only permit them in strings and characters, |
| 2206 | not arbitrarily in the source code, as in some other languages. */ | 2206 | not arbitrarily in the source code, as in some other languages. */ |
| 2207 | { | 2207 | { |
| 2208 | int i = 0; | 2208 | unsigned int i = 0; |
| 2209 | int count = 0; | 2209 | int count = 0; |
| 2210 | 2210 | ||
| 2211 | while (++count <= unicode_hex_count) | 2211 | while (++count <= unicode_hex_count) |
| @@ -2222,7 +2222,8 @@ read_escape (readcharfun, stringp) | |||
| 2222 | break; | 2222 | break; |
| 2223 | } | 2223 | } |
| 2224 | } | 2224 | } |
| 2225 | 2225 | if (i > 0x10FFFF) | |
| 2226 | error ("Non-Unicode character: 0x%x", i); | ||
| 2226 | return i; | 2227 | return i; |
| 2227 | } | 2228 | } |
| 2228 | 2229 | ||