diff options
Diffstat (limited to 'Build/source/texk/web2c/etexdir')
-rw-r--r-- | Build/source/texk/web2c/etexdir/ChangeLog | 4 | ||||
-rw-r--r-- | Build/source/texk/web2c/etexdir/etex.ch | 3 |
2 files changed, 7 insertions, 0 deletions
diff --git a/Build/source/texk/web2c/etexdir/ChangeLog b/Build/source/texk/web2c/etexdir/ChangeLog index 5d6d225d293..4a71c7f3cc0 100644 --- a/Build/source/texk/web2c/etexdir/ChangeLog +++ b/Build/source/texk/web2c/etexdir/ChangeLog @@ -1,3 +1,7 @@ +2021-02-22 Phelype Oleinik <phe.h.o1@gmail.com> + + * etex.ch: avoid "expansion depth" overflow with \numexpr. + 2021-02-13 Karl Berry <karl@freefriends.org> * am/etex.am (etex_ch_srcs): adjust for split enctex changes. diff --git a/Build/source/texk/web2c/etexdir/etex.ch b/Build/source/texk/web2c/etexdir/etex.ch index cf0d56c6479..d6363552633 100644 --- a/Build/source/texk/web2c/etexdir/etex.ch +++ b/Build/source/texk/web2c/etexdir/etex.ch @@ -5017,7 +5017,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); @<Scan and evaluate an expression |e| of type |l|@>; +decr(expand_depth_count); if b then begin print_err("Arithmetic overflow"); @.Arithmetic overflow@> |