aboutsummaryrefslogtreecommitdiffstats
path: root/src/eval.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/eval.c')
-rw-r--r--src/eval.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/eval.c b/src/eval.c
index 02fc3426f83..9ff25859646 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -1272,7 +1272,10 @@ internal_lisp_condition_case (volatile Lisp_Object var, Lisp_Object bodyform,
1272 1272
1273 { /* The first clause is the one that should be checked first, so it should 1273 { /* The first clause is the one that should be checked first, so it should
1274 be added to handlerlist last. So we build in `clauses' a table that 1274 be added to handlerlist last. So we build in `clauses' a table that
1275 contains `handlers' but in reverse order. */ 1275 contains `handlers' but in reverse order. SAFE_ALLOCA won't work
1276 here due to the setjmp, so impose a MAX_ALLOCA limit. */
1277 if (MAX_ALLOCA / word_size < clausenb)
1278 memory_full (SIZE_MAX);
1276 Lisp_Object *clauses = alloca (clausenb * sizeof *clauses); 1279 Lisp_Object *clauses = alloca (clausenb * sizeof *clauses);
1277 Lisp_Object *volatile clauses_volatile = clauses; 1280 Lisp_Object *volatile clauses_volatile = clauses;
1278 int i = clausenb; 1281 int i = clausenb;
@@ -1311,7 +1314,7 @@ internal_lisp_condition_case (volatile Lisp_Object var, Lisp_Object bodyform,
1311 return val; 1314 return val;
1312 } 1315 }
1313 } 1316 }
1314 } 1317 }
1315 1318
1316 val = eval_sub (bodyform); 1319 val = eval_sub (bodyform);
1317 handlerlist = oldhandlerlist; 1320 handlerlist = oldhandlerlist;
@@ -2789,10 +2792,11 @@ usage: (funcall FUNCTION &rest ARGUMENTS) */)
2789 val = (XSUBR (fun)->function.aMANY) (numargs, args + 1); 2792 val = (XSUBR (fun)->function.aMANY) (numargs, args + 1);
2790 else 2793 else
2791 { 2794 {
2795 Lisp_Object internal_argbuf[8];
2792 if (XSUBR (fun)->max_args > numargs) 2796 if (XSUBR (fun)->max_args > numargs)
2793 { 2797 {
2794 internal_args = alloca (XSUBR (fun)->max_args 2798 eassert (XSUBR (fun)->max_args <= ARRAYELTS (internal_argbuf));
2795 * sizeof *internal_args); 2799 internal_args = internal_argbuf;
2796 memcpy (internal_args, args + 1, numargs * word_size); 2800 memcpy (internal_args, args + 1, numargs * word_size);
2797 for (i = numargs; i < XSUBR (fun)->max_args; i++) 2801 for (i = numargs; i < XSUBR (fun)->max_args; i++)
2798 internal_args[i] = Qnil; 2802 internal_args[i] = Qnil;