Mercurial > emacs
changeset 6470:651b49e52c9e
(read1): Check for invalid modifier bits in a string.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Tue, 22 Mar 1994 21:59:02 +0000 |
parents | 4cf30ff89a5e |
children | 4e6b54b64d94 |
files | src/lread.c |
diffstat | 1 files changed, 8 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lread.c Tue Mar 22 20:48:30 1994 +0000 +++ b/src/lread.c Tue Mar 22 21:59:02 1994 +0000 @@ -1210,11 +1210,15 @@ 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);