diff options
author | Karl Berry <karl@freefriends.org> | 2021-02-24 18:00:42 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-02-24 18:00:42 +0000 |
commit | 12819de5a193a81ba460e12c80e9e5af3d88e8a7 (patch) | |
tree | fa3f87dafcc4c8614fa373e364f77826a485ce02 /Build/source/texk/web2c/etexdir | |
parent | 1f8a99f91f89d808a685fb90434693017786a8a6 (diff) | |
parent | 3ce790a95a47285842ce11676520c9ebaa3d6d83 (diff) |
sync with trunk 57871; starting pretest
git-svn-id: svn://tug.org/texlive/branches/branch2020@57872 c570f23f-e606-0410-a88d-b1316a301751
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@> |