Skip to content

Commit 2d49786

Browse files
toshihirok-okada
toshihiro
authored andcommitted
In sequence.c, start/end parameter check is corrected for arrays
since specifying start>end caused a segmentation fault.
1 parent 5b7ac57 commit 2d49786

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lisp/c/sequence.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,9 @@ pointer argv[];
142142
a=a->c.ary.entity;}
143143
if (isvector(a)) {
144144
count=vecsize(a);
145-
if (n==3) e=min(e,count);
145+
if (s>count) error(E_STARTEND);
146+
if (n==3) {
147+
if (e>count) error(E_STARTEND); }
146148
else e=count;
147149
count=e-s;
148150
switch(elmtypeof(a)) {

0 commit comments

Comments
 (0)