From 8bc226db4176d6bdcc4c60761bbd4d0104f3786d Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 22 Feb 2021 23:14:17 +0000 Subject: limit \numexpr recusion by expand_depth, like \number (from phelype) git-svn-id: svn://tug.org/texlive/trunk@57850 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/web2c/xetexdir/xetex.web | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Build/source/texk/web2c/xetexdir/xetex.web') diff --git a/Build/source/texk/web2c/xetexdir/xetex.web b/Build/source/texk/web2c/xetexdir/xetex.web index 04e00da0152..8aa90220eb4 100644 --- a/Build/source/texk/web2c/xetexdir/xetex.web +++ b/Build/source/texk/web2c/xetexdir/xetex.web @@ -32966,7 +32966,10 @@ var a,@!b:boolean; {saved values of |arith_error|} @!p:pointer; {top of expression stack} @!q:pointer; {for stack manipulations} begin l:=cur_val_level; a:=arith_error; b:=false; p:=null; +incr(expand_depth_count); +if expand_depth_count>=expand_depth then overflow("expansion depth",expand_depth); @; +decr(expand_depth_count); if b then begin print_err("Arithmetic overflow"); @.Arithmetic overflow@> -- cgit v1.2.3