summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorHironobu Yamashita <h.y.acetaminophen@gmail.com>2022-10-22 00:16:13 +0000
committerHironobu Yamashita <h.y.acetaminophen@gmail.com>2022-10-22 00:16:13 +0000
commit0b5ee95bbdb56df317b10c39437193ca69228919 (patch)
tree5408740add5040d6b89a66be17a9d4dd594c940c /Build
parent933a15efd008412729fe88898b53e70ddc9265c1 (diff)
alephdir: sync with security fixes of tex.ch
git-svn-id: svn://tug.org/texlive/trunk@64777 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r--Build/source/texk/web2c/alephdir/ChangeLog9
-rw-r--r--Build/source/texk/web2c/alephdir/com16bit.ch16
-rw-r--r--Build/source/texk/web2c/alephdir/comsrcspec.ch8
3 files changed, 31 insertions, 2 deletions
diff --git a/Build/source/texk/web2c/alephdir/ChangeLog b/Build/source/texk/web2c/alephdir/ChangeLog
index 25dc1713c20..d3fb8222e3f 100644
--- a/Build/source/texk/web2c/alephdir/ChangeLog
+++ b/Build/source/texk/web2c/alephdir/ChangeLog
@@ -1,3 +1,12 @@
+2022-10-22 Hironobu Yamashita <h.y.acetaminophen@gmail.com>
+
+ * com16bit.ch: Sync with tex.ch changes:
+ - 2022-07-16 r63916 to disallow \noexpand\endwrite.
+ - 2021-07-22 r60013 explicit fmt loading error.
+ - 2022-09-28 r64547 protect against recursive --halt-on-error.
+ * comsrcspec.ch: Sync with tex.ch changes:
+ - 2022-09-28 r64547 protect against recursive --halt-on-error.
+
2022-03-21 Karl Berry <karl@tug.org>
* TL'22 release.
diff --git a/Build/source/texk/web2c/alephdir/com16bit.ch b/Build/source/texk/web2c/alephdir/com16bit.ch
index 94d9f839398..7af53f518c2 100644
--- a/Build/source/texk/web2c/alephdir/com16bit.ch
+++ b/Build/source/texk/web2c/alephdir/com16bit.ch
@@ -1039,6 +1039,14 @@ begin input_ptr:=0; max_in_stack:=0;
source_filename_stack[0]:=0;full_source_filename_stack[0]:=0;
@z
+% 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.???] set limit when fatal_error
else fatal_error("*** (cannot \read from terminal in nonstop modes)")
@y
@@ -2294,7 +2302,7 @@ format_debug('string pool checksum')(x);
if x<>@$ then begin {check that strings are the same}
wake_up_terminal;
wterm_ln('---! ', stringcast(name_of_file+1),
- ' made by different executable version');
+ ' made by different executable version, strings are different');
goto bad_fmt;
end;
undump_int(x);
@@ -2873,9 +2881,15 @@ system-dependent section allows easy integration of Web2c and e-\TeX, etc.)
@ The |edit_name_start| will be set to point into |str_pool| somewhere after
its beginning if \TeX\ is supposed to switch to an editor on exit.
+Initialize the |stop_at_space| variable for filename parsing.
+
+Initialize the |halting_on_error_p| variable to avoid infloop with
+\.{--halt-on-error}.
+
@<Set init...@>=
edit_name_start:=0;
stop_at_space:=true;
+halting_on_error_p:=false;
@ These are used when we regenerate the representation of the first 256
strings.
diff --git a/Build/source/texk/web2c/alephdir/comsrcspec.ch b/Build/source/texk/web2c/alephdir/comsrcspec.ch
index 41ec7007f47..9a1680c4a6f 100644
--- a/Build/source/texk/web2c/alephdir/comsrcspec.ch
+++ b/Build/source/texk/web2c/alephdir/comsrcspec.ch
@@ -10,6 +10,7 @@
@!parse_first_line_p:cinttype; {parse the first line for options}
@!file_line_error_style_p:cinttype; {format messages as file:line:error}
@!halt_on_error_p:boolean; {allow only on error.}
+@!halting_on_error_p:boolean; {already trying to halt?}
@!src_specials_p : boolean;
@!insert_src_special_auto : boolean;
@@ -62,7 +63,12 @@ print_char("."); show_context;
@y
print_char("."); show_context;
if (halt_on_error_p) then begin
- history:=fatal_error_stop; jump_out;
+ {If |close_files_and_terminate| generates an error, we'll end up back
+ here; just give up in that case. If files are truncated, too bad.}
+ if (halting_on_error_p) then do_final_end; {quit immediately}
+ halting_on_error_p:=true;
+ history:=fatal_error_stop;
+ jump_out;
end;
@z