Commit a4cf38e4 authored by Paul Eggert's avatar Paul Eggert

* fns.c: Check that character arg fits in 'int'.

parent 311d5d7c
......@@ -3,6 +3,7 @@
* fns.c (Ffillarray): Don't assume bool vector size fits in 'int'.
Use much-faster test for byte-length change.
Don't assume string byte-length fits in 'int'.
Check that character arg fits in 'int'.
* alloc.c (Fmake_bool_vector): Avoid unnecessary multiplication.
......
......@@ -2141,7 +2141,6 @@ ARRAY is a vector, string, char-table, or bool-vector. */)
(Lisp_Object array, Lisp_Object item)
{
register EMACS_INT size, idx;
int charval;
if (VECTORP (array))
{
......@@ -2161,8 +2160,9 @@ ARRAY is a vector, string, char-table, or bool-vector. */)
else if (STRINGP (array))
{
register unsigned char *p = SDATA (array);
CHECK_NUMBER (item);
charval = XINT (item);
int charval;
CHECK_CHARACTER (item);
charval = XFASTINT (item);
size = SCHARS (array);
if (STRING_MULTIBYTE (array))
{
......
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