mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-23 13:27:36 +00:00
(read1): Check for invalid modifier bits in a string.
This commit is contained in:
parent
18e3ab4119
commit
f943104adb
1 changed files with 8 additions and 4 deletions
12
src/lread.c
12
src/lread.c
|
|
@ -1210,11 +1210,15 @@ read1 (readcharfun)
|
|||
if (p == read_buffer)
|
||||
cancel = 1;
|
||||
}
|
||||
else if (c & CHAR_META)
|
||||
/* Move the meta bit to the right place for a string. */
|
||||
*p++ = (c & ~CHAR_META) | 0x80;
|
||||
else
|
||||
*p++ = c;
|
||||
{
|
||||
if (c & CHAR_META)
|
||||
/* Move the meta bit to the right place for a string. */
|
||||
c = (c & ~CHAR_META) | 0x80;
|
||||
if (c & ~0xff)
|
||||
error ("Invalid modifier in string");
|
||||
*p++ = c;
|
||||
}
|
||||
}
|
||||
if (c < 0) return Fsignal (Qend_of_file, Qnil);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue