texlive[72951] Build/source/texk/web2c: from drf: initialize

commits+karl at tug.org commits+karl at tug.org
Sun Nov 24 18:37:47 CET 2024


Revision: 72951
          https://tug.org/svn/texlive?view=revision&revision=72951
Author:   karl
Date:     2024-11-24 18:37:46 +0100 (Sun, 24 Nov 2024)
Log Message:
-----------
from drf: initialize buffer[0] since virtex might read it

Modified Paths:
--------------
    trunk/Build/source/texk/web2c/ChangeLog
    trunk/Build/source/texk/web2c/tex.ch

Modified: trunk/Build/source/texk/web2c/ChangeLog
===================================================================
--- trunk/Build/source/texk/web2c/ChangeLog	2024-11-24 00:49:11 UTC (rev 72950)
+++ trunk/Build/source/texk/web2c/ChangeLog	2024-11-24 17:37:46 UTC (rev 72951)
@@ -1,3 +1,9 @@
+2024-11-24  David Fuchs  <drfuchs at yahoo.com>
+
+	* tex.ch (Initialize the input routines): also initialize
+	buffer[0]:=0 for uninitialized virtex read, in the
+	cases of printing garbage fixed by Kitagawa-san on 2021-07-19.
+
 2024-11-13  Karl Berry  <karl at freefriends.org>
 
 	* mf.ch (Calculate integers $\alpha$...): comment out erroneous

Modified: trunk/Build/source/texk/web2c/tex.ch
===================================================================
--- trunk/Build/source/texk/web2c/tex.ch	2024-11-24 00:49:11 UTC (rev 72950)
+++ trunk/Build/source/texk/web2c/tex.ch	2024-11-24 17:37:46 UTC (rev 72951)
@@ -787,6 +787,7 @@
 end;
 @z
 
+% Original report: https://tug.org/pipermail/tex-k/2021-July/003630.html
 @x [5.71] l.1713 - term_input: set limit when fatal_error
 if not input_ln(term_in,true) then fatal_error("End of file on the terminal!");
 @y
@@ -1501,6 +1502,14 @@
 source_filename_stack[0]:=0;full_source_filename_stack[0]:=0;
 @z
 
+% This one is a consequence of the limit:=0 fix.
+ at x [23.331] l.7095 - initialize buffer[0]
+first:=buf_size; repeat buffer[first]:=0; decr(first); until first=0;
+ at y
+first:=buf_size; repeat buffer[first]:=0; decr(first); until first=0;
+buffer[0]:=0;
+ at z
+
 % Original report: https://tug.org/pipermail/tex-k/2024-March/004021.html
 % TeX bug entry:   https://tug.org/texmfbug/newbug.html#B142outer
 @x [24.336] l.7152 - allow interactive deletion of \outer token
@@ -1560,6 +1569,7 @@
 if (t>=cs_token_flag)and(t<>end_write_token) then
 @z
 
+% See above change "term_input: set limit when fatal_error" for references.
 @x [27.484] l.9495 - set limit when fatal_error
 else fatal_error("*** (cannot \read from terminal in nonstop modes)")
 @y



More information about the tex-live-commits mailing list.