diff options
| author | Karl Heuer | 1994-03-22 21:59:02 +0000 |
|---|---|---|
| committer | Karl Heuer | 1994-03-22 21:59:02 +0000 |
| commit | f943104adbd9be9e67f2ae17dcd0c4143f075acd (patch) | |
| tree | dfa9bde8d2846f41cfd5c07a0f675b5d369fd77d /src | |
| parent | 18e3ab4119a7d674e60261e44f03faee117cf596 (diff) | |
| download | emacs-f943104adbd9be9e67f2ae17dcd0c4143f075acd.tar.gz emacs-f943104adbd9be9e67f2ae17dcd0c4143f075acd.zip | |
(read1): Check for invalid modifier bits in a string.
Diffstat (limited to 'src')
| -rw-r--r-- | src/lread.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/lread.c b/src/lread.c index ccb2f52d238..af7a0153b02 100644 --- a/src/lread.c +++ b/src/lread.c | |||
| @@ -1210,11 +1210,15 @@ read1 (readcharfun) | |||
| 1210 | if (p == read_buffer) | 1210 | if (p == read_buffer) |
| 1211 | cancel = 1; | 1211 | cancel = 1; |
| 1212 | } | 1212 | } |
| 1213 | else if (c & CHAR_META) | ||
| 1214 | /* Move the meta bit to the right place for a string. */ | ||
| 1215 | *p++ = (c & ~CHAR_META) | 0x80; | ||
| 1216 | else | 1213 | else |
| 1217 | *p++ = c; | 1214 | { |
| 1215 | if (c & CHAR_META) | ||
| 1216 | /* Move the meta bit to the right place for a string. */ | ||
| 1217 | c = (c & ~CHAR_META) | 0x80; | ||
| 1218 | if (c & ~0xff) | ||
| 1219 | error ("Invalid modifier in string"); | ||
| 1220 | *p++ = c; | ||
| 1221 | } | ||
| 1218 | } | 1222 | } |
| 1219 | if (c < 0) return Fsignal (Qend_of_file, Qnil); | 1223 | if (c < 0) return Fsignal (Qend_of_file, Qnil); |
| 1220 | 1224 | ||