From c68822b26f239424bb11fb49690994f7ea128cea Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 17 Jul 2022 00:36:16 +0000 Subject: fix from drf to disallow \noexpand\endwrite, per https://tex.stackexchange.com/questions/609423 git-svn-id: svn://tug.org/texlive/trunk@63916 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/web2c/ChangeLog | 8 ++++++++ Build/source/texk/web2c/tex.ch | 14 +++++++++++--- 2 files changed, 19 insertions(+), 3 deletions(-) (limited to 'Build/source/texk/web2c') diff --git a/Build/source/texk/web2c/ChangeLog b/Build/source/texk/web2c/ChangeLog index 1acaa12f589..a876a06acce 100644 --- a/Build/source/texk/web2c/ChangeLog +++ b/Build/source/texk/web2c/ChangeLog @@ -1,3 +1,11 @@ +2022-07-16 Karl Berry + + * tex.ch (25.369, ): disallow + \noexpand\endwrite, else we get a seg fault because of fetching + mem[null]. Fix from drf. + Original report: https://tex.stackexchange.com/questions/609423 + TeX bug entry: https://tug.org/texmfbug/newbug.html#B155endwrite + 2022-06-12 TANAKA Takuji * texmfmp-help.h ((e)(u)pTeX), help.h ((u)pBibTeX): diff --git a/Build/source/texk/web2c/tex.ch b/Build/source/texk/web2c/tex.ch index 9530eb65795..30d3b5044ad 100644 --- a/Build/source/texk/web2c/tex.ch +++ b/Build/source/texk/web2c/tex.ch @@ -1522,7 +1522,7 @@ aligning:begin print(" while scanning preamble"); info(p):=right_brace_token+"}" absorbing:begin print(" while scanning text"); info(p):=right_brace_token+"}"; @z -@x [25.366] +@x [25.366] l.7672 - expansion depth overflow begin cv_backup:=cur_val; cvl_backup:=cur_val_level; radix_backup:=radix; @y begin @@ -1531,14 +1531,22 @@ if expand_depth_count>=expand_depth then overflow("expansion depth",expand_depth cv_backup:=cur_val; cvl_backup:=cur_val_level; radix_backup:=radix; @z -@x [25.366] +@x [25.366] l.7678 - expansion depth overflow cur_order:=co_backup; link(backup_head):=backup_backup; @y cur_order:=co_backup; link(backup_head):=backup_backup; decr(expand_depth_count); @z -@x [27.484] set limit when fatal_error +% Original report: https://tex.stackexchange.com/questions/609423 +% TeX bug entry: https://tug.org/texmfbug/newbug.html#B155endwrite +@x [25.369] l.7717 - disallow \noexpand\endwrite +if t>=cs_token_flag then +@y +if (t>=cs_token_flag)and(t<>end_write_token) then +@z + +@x [27.484] l.9495 - set limit when fatal_error else fatal_error("*** (cannot \read from terminal in nonstop modes)") @y else begin -- cgit v1.2.3