summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/xetexdir
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/texk/web2c/xetexdir')
-rw-r--r--Build/source/texk/web2c/xetexdir/ChangeLog4
-rw-r--r--Build/source/texk/web2c/xetexdir/xetex.web3
2 files changed, 7 insertions, 0 deletions
diff --git a/Build/source/texk/web2c/xetexdir/ChangeLog b/Build/source/texk/web2c/xetexdir/ChangeLog
index d68c003cc16..cfbdeaf80a9 100644
--- a/Build/source/texk/web2c/xetexdir/ChangeLog
+++ b/Build/source/texk/web2c/xetexdir/ChangeLog
@@ -1,3 +1,7 @@
+2021-02-22 Phelype Oleinik <phe.h.o1@gmail.com>
+
+ * eobase.ch: avoid "expansion depth" overflow with \numexpr.
+
2021-02-17 Karl Berry <karl@tug.org>
* NEWS,
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);
@<Scan and evaluate an expression |e| of type |l|@>;
+decr(expand_depth_count);
if b then
begin print_err("Arithmetic overflow");
@.Arithmetic overflow@>