Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
a4cf38e4
Commit
a4cf38e4
authored
Jun 18, 2011
by
Paul Eggert
Browse files
* fns.c: Check that character arg fits in 'int'.
parent
311d5d7c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
src/ChangeLog
src/ChangeLog
+1
-0
src/fns.c
src/fns.c
+3
-3
No files found.
src/ChangeLog
View file @
a4cf38e4
...
...
@@ -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.
...
...
src/fns.c
View file @
a4cf38e4
...
...
@@ -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))
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment