diff options
author | Karl Berry <karl@freefriends.org> | 2008-03-14 16:44:45 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2008-03-14 16:44:45 +0000 |
commit | fa6b5eddacadba68e0ea025dbbe1ed578f4ef838 (patch) | |
tree | 4c95e2d1a9f2f9917933b26ffb57ddcfa9ef4109 /Build/source/texk/tetex | |
parent | 75b28fdb913fa81f4775060efca1ae830f684324 (diff) |
detect infinite loop, from Stepan
git-svn-id: svn://tug.org/texlive/trunk@6967 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/tetex')
-rw-r--r-- | Build/source/texk/tetex/ChangeLog | 5 | ||||
-rwxr-xr-x | Build/source/texk/tetex/fmtutil | 12 |
2 files changed, 16 insertions, 1 deletions
diff --git a/Build/source/texk/tetex/ChangeLog b/Build/source/texk/tetex/ChangeLog index bf2cd4cf8e2..a602b221433 100644 --- a/Build/source/texk/tetex/ChangeLog +++ b/Build/source/texk/tetex/ChangeLog @@ -1,3 +1,8 @@ +2008-03-14 Karl Berry <karl@tug.org> + + * fmtutil: check for infinite loops. + From Stepan Kasal, http://bugzilla.redhat.com/show_bug.cgi?id=437008. + 2008-03-07 Karl Berry <karl@tug.org> * Makefile.in (LINKEDPLSCRIPTS): rename from LINKEDPERLSCRIPTS. diff --git a/Build/source/texk/tetex/fmtutil b/Build/source/texk/tetex/fmtutil index 1314e799939..0cdb4347121 100755 --- a/Build/source/texk/tetex/fmtutil +++ b/Build/source/texk/tetex/fmtutil @@ -29,6 +29,7 @@ ############################################################################### # program history: +# further changes in texk/tetex/ChangeLog. # 2007-01-04 patch by JK to support $engine subdir (enabled by default) # Fr Apr 8 19:15:05 CEST 2005 cleanup now has an argument for the return code # Do Mar 02 10:42:31 CET 2006 add tmpdir to TEXFORMATS @@ -83,7 +84,7 @@ test -n "${ZSH_VERSION+set}" && alias -g '${1+"$@"}'='"$@"' progname=fmtutil argv0=$0 -version=1168729197 # seconds since `00:00:00 1970-01-01 UTC' +version=1205513038 # seconds since `00:00:00 1970-01-01 UTC' # date '+%s' (with GNU date) cnf=fmtutil.cnf # name of the config file @@ -678,6 +679,15 @@ run_initex() esac rm -f $fmtfile + + # Check for infinite recursion before running the iniTeX: + case :$mktexfmt_loop: in + *:"$format":*) + abort "Infinite recursion detected, giving up!" ;; + esac + mktexfmt_loop=$mktexfmt_loop:$format + export mktexfmt_loop + verboseMsg "$progname: running \`$engine -ini $tcxflag $jobswitch $prgswitch $texargs' ..." # run in a subshell to get a local effect of TEXPOOL manipulation: |