Commit f943104a authored by Karl Heuer's avatar Karl Heuer

(read1): Check for invalid modifier bits in a string.

parent 18e3ab41
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment