From 18bffcd0f7855b2406f1199d10eb3e2a381b16c2 Mon Sep 17 00:00:00 2001 From: Marius Vollmer Date: Mon, 29 May 2006 20:35:48 +0000 Subject: [PATCH] (scm_ithrow): When looking for the jmpbuf, first test that we have a pair before accessing its cdr. Thanks to Bill Schottstaedt! --- libguile/ChangeLog | 6 ++++++ libguile/throw.c | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/libguile/ChangeLog b/libguile/ChangeLog index 78103fa4f..fb2bb123f 100644 --- a/libguile/ChangeLog +++ b/libguile/ChangeLog @@ -1,3 +1,9 @@ +2006-05-29 Marius Vollmer + + * throw.c (scm_ithrow): When looking for the jmpbuf, first test + that we have a pair before accessing its cdr. Thanks to Bill + Schottstaedt! + 2006-05-28 Marius Vollmer * srfi-4.c, strings.c: Replace SCM_C_INLINE with diff --git a/libguile/throw.c b/libguile/throw.c index e2b9526c7..12c90b8d8 100644 --- a/libguile/throw.c +++ b/libguile/throw.c @@ -736,7 +736,8 @@ scm_ithrow (SCM key, SCM args, int noreturn SCM_UNUSED) abort (); for (wind_goal = scm_i_dynwinds (); - !scm_is_eq (SCM_CDAR (wind_goal), jmpbuf); + (!scm_is_pair (SCM_CAR (wind_goal)) + || !scm_is_eq (SCM_CDAR (wind_goal), jmpbuf)); wind_goal = SCM_CDR (wind_goal)) ;