mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-10 14:00:21 +02:00
(scm_aind): Test SCM_CONSP rather than !SCM_NULLP while
traversing the args list, fixes segv if an improper list is given. Reported by Rouben Rostamian.
This commit is contained in:
parent
524cbf6449
commit
1382414987
1 changed files with 2 additions and 2 deletions
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 1995,1996,1997,1998,2000,2001 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1995,1996,1997,1998,2000,2001,2004 Free Software Foundation, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
|
@ -473,7 +473,7 @@ scm_aind (SCM ra, SCM args, const char *what)
|
|||
scm_error_num_args_subr (what);
|
||||
return pos + (SCM_INUM (args) - s->lbnd) * (s->inc);
|
||||
}
|
||||
while (k && !SCM_NULLP (args))
|
||||
while (k && SCM_CONSP (args))
|
||||
{
|
||||
ind = SCM_CAR (args);
|
||||
args = SCM_CDR (args);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue