summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/alephdir
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2009-11-19 10:42:50 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2009-11-19 10:42:50 +0000
commitac34447a6fc45b4173276416d918eda488af0684 (patch)
tree7dfe126354ff1f1d8c9b55d42b9ffbdd2bb12c57 /Build/source/texk/web2c/alephdir
parent08a061da0b728753dd6307baa8e34981274c5432 (diff)
texk/web2c/: bug fix: check font name length to avoid broken dvi files
git-svn-id: svn://tug.org/texlive/trunk@16075 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/alephdir')
-rw-r--r--Build/source/texk/web2c/alephdir/ChangeLog5
-rw-r--r--Build/source/texk/web2c/alephdir/com16bit.ch24
2 files changed, 28 insertions, 1 deletions
diff --git a/Build/source/texk/web2c/alephdir/ChangeLog b/Build/source/texk/web2c/alephdir/ChangeLog
index b149d685082..7a256b81558 100644
--- a/Build/source/texk/web2c/alephdir/ChangeLog
+++ b/Build/source/texk/web2c/alephdir/ChangeLog
@@ -1,3 +1,8 @@
+2009-11-19 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * com16bit.ch read_font_info: Check font name length to avoid
+ broken .dvi files.
+
2009-11-09 Peter Breitenlohner <peb@mppmu.mpg.de>
* com16bit.ch: Check for allowed filename before opening the
diff --git a/Build/source/texk/web2c/alephdir/com16bit.ch b/Build/source/texk/web2c/alephdir/com16bit.ch
index fea714b8777..f240d4557ae 100644
--- a/Build/source/texk/web2c/alephdir/com16bit.ch
+++ b/Build/source/texk/web2c/alephdir/com16bit.ch
@@ -1536,7 +1536,29 @@ if name=str_ptr-1 then {we can conserve string pool space now}
@y
@z
-@x [30.563] l.10943 - Don't use TEX_font_area.
+@x [30.560] l.10898 - Check lengths
+@!file_opened:boolean; {was |tfm_file| successfully opened?}
+@y
+@!name_too_long:boolean; {|nom| or |aire| exceeds 255 bytes}
+@!file_opened:boolean; {was |tfm_file| successfully opened?}
+@z
+
+@x [30.561] l.10939 - Check lengths
+else print(" not loadable: Metric (TFM/OFM) file not found");
+@y
+else if name_too_long then print(" not loadable: Metric (TFM/OFM) name too long")
+else print(" not loadable: Metric (TFM/OFM) file not found");
+@z
+
+@x [30.563] l.10960 - Check lengths
+file_opened:=false;
+@y
+file_opened:=false;
+name_too_long:=(length(nom)>255)or(length(aire)>255);
+if name_too_long then abort;
+@z
+
+@x [30.563] l.10961 - Don't use TEX_font_area.
if aire="" then pack_file_name(nom,TEX_font_area,".ofm")
else pack_file_name(nom,aire,".ofm");
if not b_open_in(tfm_file) then abort;