[uim-commit] r1934 - branches/r5rs/sigscheme
yamaken at freedesktop.org
yamaken at freedesktop.org
Tue Nov 1 06:24:33 PST 2005
Author: yamaken
Date: 2005-11-01 06:24:16 -0800 (Tue, 01 Nov 2005)
New Revision: 1934
Modified:
branches/r5rs/sigscheme/eval.c
Log:
* sigscheme/eval.c
- (lookup_frame): Fix broken frame handling that causes SEGV
Modified: branches/r5rs/sigscheme/eval.c
===================================================================
--- branches/r5rs/sigscheme/eval.c 2005-11-01 13:14:31 UTC (rev 1933)
+++ branches/r5rs/sigscheme/eval.c 2005-11-01 14:24:16 UTC (rev 1934)
@@ -201,8 +201,13 @@
SigScm_ErrorObj("broken frame : ", frame);
/* lookup in frame */
+ /*
+ * CONSP(vals) is required to reject hand-maid broken frame:
+ * (eval '(+ x y) '((x . 4)
+ * (y . 6)))
+ */
for (vars = CAR(frame), vals = CDR(frame);
- CONSP(vars);
+ CONSP(vars) && CONSP(vals);
vars = CDR(vars), vals = CDR(vals))
{
if (EQ(CAR(vars), var))
@@ -210,7 +215,8 @@
}
/* handle dot list */
- if (!NULLP(vars) && SYMBOLP(vars))
+ /* CONSP(vals) is required to reject hand-maid broken frame */
+ if (!NULLP(vars) && SYMBOLP(vars) && CONSP(vals))
return (EQ(vars, var)) ? vals : SCM_NULL;
return SCM_NULL;
More information about the uim-commit
mailing list