summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/gftodvi.ch
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2012-02-01 15:06:57 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2012-02-01 15:06:57 +0000
commit0cce946c0c1b1ea96d7cafad585d90ef52bee170 (patch)
tree2d22fc60b2f376f11abe6d191102dab44a65f051 /Build/source/texk/web2c/gftodvi.ch
parentb527db88eb00d1921ad65e0eb1f6ed9b71033372 (diff)
TeX, MF, and Co: Ensure DVI/GF file size <2GB
git-svn-id: svn://tug.org/texlive/trunk@25263 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/gftodvi.ch')
-rw-r--r--Build/source/texk/web2c/gftodvi.ch18
1 files changed, 18 insertions, 0 deletions
diff --git a/Build/source/texk/web2c/gftodvi.ch b/Build/source/texk/web2c/gftodvi.ch
index 01f689a02c8..3a523ec8163 100644
--- a/Build/source/texk/web2c/gftodvi.ch
+++ b/Build/source/texk/web2c/gftodvi.ch
@@ -475,6 +475,24 @@ begin
end;
@z
+@x [108] dvi_swap: check dvi file size
+begin if dvi_limit=dvi_buf_size then
+@y
+begin if dvi_ptr>(@"7FFFFFFF-dvi_offset) then
+ abort('dvi length exceeds "7FFFFFFF');
+@.dvi length exceeds...@>
+if dvi_limit=dvi_buf_size then
+@z
+
+@x [109] empty the last bytes: check dvi file size
+if dvi_ptr>0 then write_dvi(0,dvi_ptr-1)
+@y
+if dvi_ptr>(@"7FFFFFFF-dvi_offset) then
+ abort('dvi length exceeds "7FFFFFFF');
+@.dvi length exceeds...@>
+if dvi_ptr>0 then write_dvi(0,dvi_ptr-1)
+@z
+
% [111] More .b?'s.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@x