summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorHironobu Yamashita <h.y.acetaminophen@gmail.com>2017-09-09 21:54:31 +0000
committerHironobu Yamashita <h.y.acetaminophen@gmail.com>2017-09-09 21:54:31 +0000
commit78bea0cd1a3206a08626c39ea4eeb76a4e0ca7d9 (patch)
tree96c2e63d9f280107d4180ad5e42b934763ff220c /Build
parent1f88188d33aa368bed61fd2195622cd0649659b4 (diff)
ptftopl.ch: avoid negative allocation
http://tug.org/pipermail/tex-k/2017-September/002811.html git-svn-id: svn://tug.org/texlive/trunk@45250 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r--Build/source/texk/web2c/ptexdir/ChangeLog4
-rw-r--r--Build/source/texk/web2c/ptexdir/ptftopl.ch1
2 files changed, 5 insertions, 0 deletions
diff --git a/Build/source/texk/web2c/ptexdir/ChangeLog b/Build/source/texk/web2c/ptexdir/ChangeLog
index 8a34f3c83ae..b5e7b63c6ba 100644
--- a/Build/source/texk/web2c/ptexdir/ChangeLog
+++ b/Build/source/texk/web2c/ptexdir/ChangeLog
@@ -1,3 +1,7 @@
+2017-09-09 Hironobu Yamashita <h.y.acetaminophen@gmail.com>
+
+ * ptftopl.ch: Check for fifth byte (= upper byte of lf) of input JFM.
+
2017-09-07 Hironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
* ptex-base.ch: More restrictions on direction change commands.
diff --git a/Build/source/texk/web2c/ptexdir/ptftopl.ch b/Build/source/texk/web2c/ptexdir/ptftopl.ch
index e28f184e3bd..c9c08c0588a 100644
--- a/Build/source/texk/web2c/ptexdir/ptftopl.ch
+++ b/Build/source/texk/web2c/ptexdir/ptftopl.ch
@@ -92,6 +92,7 @@ else
if eof(tfm_file) then abort('The input file is only four bytes long!');
read(tfm_file,tfm[4]);
if eof(tfm_file) then abort('The input file is only five bytes long!');
+ if tfm[4]>127 then abort('The fifth byte of the input file exceeds 127!');
read(tfm_file,tfm[5]); lf:=tfm[4]*@'400+tfm[5];
tmp_ptr:=6;
end;