1
Fork 0
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:
Kevin Ryde 2004-01-06 22:13:08 +00:00
parent 524cbf6449
commit 1382414987

View file

@ -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);