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
e613ea97
Commit
e613ea97
authored
Apr 09, 2003
by
Kenichi Handa
Browse files
(read1): Before calling index, check if the 2nd
arguemnt is in ASCII range.
parent
cb98871c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
12 deletions
+16
-12
src/lread.c
src/lread.c
+16
-12
No files found.
src/lread.c
View file @
e613ea97
...
...
@@ -2278,16 +2278,18 @@ read1 (readcharfun, pch, first_in_list)
UNREAD
(
next_next_char
);
ok
=
(
next_next_char
<=
040
||
index
(
"
\"
';([#?"
,
next_next_char
)
||
(
!
first_in_list
&&
next_next_char
==
'`'
)
||
(
new_backquote_flag
&&
next_next_char
==
','
));
||
(
next_next_char
<
0200
&&
(
index
(
"
\"
';([#?"
,
next_next_char
)
||
(
!
first_in_list
&&
next_next_char
==
'`'
)
||
(
new_backquote_flag
&&
next_next_char
==
','
))));
}
else
{
ok
=
(
next_char
<=
040
||
index
(
"
\"
';()[]#?"
,
next_char
)
||
(
!
first_in_list
&&
next_char
==
'`'
)
||
(
new_backquote_flag
&&
next_char
==
','
));
||
(
next_char
<
0200
&&
(
index
(
"
\"
';()[]#?"
,
next_char
)
||
(
!
first_in_list
&&
next_char
==
'`'
)
||
(
new_backquote_flag
&&
next_char
==
','
))));
}
UNREAD
(
next_char
);
if
(
!
ok
)
...
...
@@ -2445,9 +2447,10 @@ read1 (readcharfun, pch, first_in_list)
UNREAD
(
next_char
);
if
(
next_char
<=
040
||
index
(
"
\"
';([#?"
,
next_char
)
||
(
!
first_in_list
&&
next_char
==
'`'
)
||
(
new_backquote_flag
&&
next_char
==
','
))
||
(
next_char
<
0200
&&
index
(
"
\"
';([#?"
,
next_char
)
||
(
!
first_in_list
&&
next_char
==
'`'
)
||
(
new_backquote_flag
&&
next_char
==
','
)))
{
*
pch
=
c
;
return
Qnil
;
...
...
@@ -2468,9 +2471,10 @@ read1 (readcharfun, pch, first_in_list)
char
*
end
=
read_buffer
+
read_buffer_size
;
while
(
c
>
040
&&
!
index
(
"
\"
';()[]#"
,
c
)
&&
!
(
!
first_in_list
&&
c
==
'`'
)
&&
!
(
new_backquote_flag
&&
c
==
','
))
&&
(
c
>=
0200
||
(
!
index
(
"
\"
';()[]#"
,
c
)
&&
!
(
!
first_in_list
&&
c
==
'`'
)
&&
!
(
new_backquote_flag
&&
c
==
','
))))
{
if
(
end
-
p
<
MAX_MULTIBYTE_LENGTH
)
{
...
...
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