mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-31 01:10:24 +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
bc63ff8bce
commit
e14ddc74de
1 changed files with 2 additions and 2 deletions
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (C) 1995,1996,1997,1998,2000,2001,2002 Free Software Foundation, Inc.
|
/* Copyright (C) 1995,1996,1997,1998,2000,2001,2002,2004 Free Software Foundation, Inc.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -500,7 +500,7 @@ scm_aind (SCM ra, SCM args, const char *what)
|
||||||
scm_error_num_args_subr (what);
|
scm_error_num_args_subr (what);
|
||||||
return pos + (SCM_INUM (args) - s->lbnd) * (s->inc);
|
return pos + (SCM_INUM (args) - s->lbnd) * (s->inc);
|
||||||
}
|
}
|
||||||
while (k && !SCM_NULLP (args))
|
while (k && SCM_CONSP (args))
|
||||||
{
|
{
|
||||||
ind = SCM_CAR (args);
|
ind = SCM_CAR (args);
|
||||||
args = SCM_CDR (args);
|
args = SCM_CDR (args);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue