summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2023-08-26 22:16:10 +0000
committerKarl Berry <karl@freefriends.org>2023-08-26 22:16:10 +0000
commitf2e621c9e3e8eb2f09d76331496983d5559c1ea3 (patch)
tree30235660b2f45a5f3089bb2831ae1ddd72491097 /Build
parent26ce48249a1c46f68c68363624085ccd767bbc09 (diff)
sync writet1.c fix to dvipsk and luatexdir
git-svn-id: svn://tug.org/texlive/trunk@68079 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r--Build/source/texk/dvipsk/ChangeLog5
-rw-r--r--Build/source/texk/dvipsk/writet1.c17
-rw-r--r--Build/source/texk/web2c/luatexdir/font/writet1.c15
-rw-r--r--Build/source/texk/web2c/omegafonts/ChangeLog4
-rwxr-xr-xBuild/source/texk/web2c/omegafonts/ligkern.test18
-rwxr-xr-xBuild/source/texk/web2c/omegaware/ligkern.test2
6 files changed, 44 insertions, 17 deletions
diff --git a/Build/source/texk/dvipsk/ChangeLog b/Build/source/texk/dvipsk/ChangeLog
index 53edb7b7165..6057b341395 100644
--- a/Build/source/texk/dvipsk/ChangeLog
+++ b/Build/source/texk/dvipsk/ChangeLog
@@ -1,3 +1,8 @@
+2023-08-26 Karl Berry <karl@freefriends.org>
+
+ * writet1.c (t1_builtin_enc): sync change from pdftexdir/writet1.c
+ (r68069).
+
2023-08-11 TANAKA Takuji <ttk@t-lab.opal.ne.jp>
* beginfontk1.test, eepic-nan.test, pfbincl.test, same-name.test,
diff --git a/Build/source/texk/dvipsk/writet1.c b/Build/source/texk/dvipsk/writet1.c
index 0a95247196f..aa6d3eaecc7 100644
--- a/Build/source/texk/dvipsk/writet1.c
+++ b/Build/source/texk/dvipsk/writet1.c
@@ -1,5 +1,5 @@
/*
-Copyright 1996-2018 Han The Thanh <thanh@pdftex.org>
+Copyright 1996-2023 Han The Thanh <thanh@pdftex.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -769,7 +769,10 @@ static char **t1_builtin_enc(void)
*t1_buf_array == '/' && valid_code(i)) {
if (strcmp(t1_buf_array + 1, notdef) != 0)
glyph_names[i] = xstrdup(t1_buf_array + 1);
- p = strstr(p, " put") + strlen(" put");
+ p = strstr(p, " put");
+ if (!p)
+ pdftex_fail("invalid pfb, no put found in dup");
+ p += strlen(" put");
skip(p, ' ');
}
/*
@@ -778,7 +781,10 @@ static char **t1_builtin_enc(void)
else if (sscanf(p, "dup dup %i exch %i get put", &b, &a) == 2
&& valid_code(a) && valid_code(b)) {
copy_glyph_names(glyph_names, a, b);
- p = strstr(p, " get put") + strlen(" get put");
+ p = strstr(p, " get put");
+ if (!p)
+ pdftex_fail("invalid pfb, no get put found in dup dup");
+ p += strlen(" get put");
skip(p, ' ');
}
/*
@@ -789,7 +795,10 @@ static char **t1_builtin_enc(void)
&& valid_code(a) && valid_code(b) && valid_code(c)) {
for (i = 0; i < c; i++)
copy_glyph_names(glyph_names, a + i, b + i);
- p = strstr(p, " putinterval") + strlen(" putinterval");
+ p = strstr(p, " putinterval");
+ if (!p)
+ pdftex_fail("invalid pfb, no putinterval found in dup dup");
+ p += strlen(" putinterval");
skip(p, ' ');
}
/*
diff --git a/Build/source/texk/web2c/luatexdir/font/writet1.c b/Build/source/texk/web2c/luatexdir/font/writet1.c
index 54862e119ab..5bd3681ed29 100644
--- a/Build/source/texk/web2c/luatexdir/font/writet1.c
+++ b/Build/source/texk/web2c/luatexdir/font/writet1.c
@@ -814,13 +814,19 @@ static char **t1_builtin_enc(void)
*t1_buf_array == '/' && valid_code(i)) {
if (strcmp(t1_buf_array + 1, notdef) != 0)
glyph_names[i] = xstrdup(t1_buf_array + 1);
- p = strstr(p, " put") + strlen(" put");
+ p = strstr(p, " put");
+ if (!p)
+ normal_error("type 1", "invalid pfb, no put found in dup");
+ p += strlen(" put");
skip_char(p, ' ');
}
/*tex Check for |dup dup <to> exch <from> get put|. */
else if (sscanf(p, "dup dup %i exch %i get put", &b, &a) == 2 && valid_code(a) && valid_code(b)) {
copy_glyph_names(glyph_names, a, b);
- p = strstr(p, " get put") + strlen(" get put");
+ p = strstr(p, " get put");
+ if (!p)
+ normal_error("type 1", "invalid pfb, no get put found in dup dup");
+ p += strlen(" get put");
skip_char(p, ' ');
}
/*tex Check for |dup dup <from> <size> getinterval <to> exch putinterval|. */
@@ -828,7 +834,10 @@ static char **t1_builtin_enc(void)
&a, &c, &b) == 3 && valid_code(a) && valid_code(b) && valid_code(c)) {
for (i = 0; i < c; i++)
copy_glyph_names(glyph_names, a + i, b + i);
- p = strstr(p, " putinterval") + strlen(" putinterval");
+ p = strstr(p, " putinterval");
+ if (!p)
+ normal_error("type 1", "invalid pfb, no putinterval found in dup dup");
+ p += strlen(" putinterval");
skip_char(p, ' ');
}
/*tex Check for |def or |readonly def|. */
diff --git a/Build/source/texk/web2c/omegafonts/ChangeLog b/Build/source/texk/web2c/omegafonts/ChangeLog
index 300919c484e..cd24d36bd07 100644
--- a/Build/source/texk/web2c/omegafonts/ChangeLog
+++ b/Build/source/texk/web2c/omegafonts/ChangeLog
@@ -1,3 +1,7 @@
+2023-08-26 Karl Berry <karl@freefriends.org>
+
+ * ligkern.test: protect against $rc being defined in the environment.
+
2023-08-19 TANAKA Takuji <ttk@t-lab.opal.ne.jp>
* {bad,charwd,check,help,level1,ligkern,ofonts,
diff --git a/Build/source/texk/web2c/omegafonts/ligkern.test b/Build/source/texk/web2c/omegafonts/ligkern.test
index d03321a9478..81f0131a8c1 100755
--- a/Build/source/texk/web2c/omegafonts/ligkern.test
+++ b/Build/source/texk/web2c/omegafonts/ligkern.test
@@ -1,6 +1,6 @@
#! /bin/sh -vx
# $Id$
-# Copyright 2017 Karl Berry <tex-live@tug.org>
+# Copyright 2017-2023 Karl Berry <tex-live@tug.org>
# Copyright 2014 Peter Breitenlohner <tex-live@tug.org>
# You may freely use, modify and/or distribute this file.
@@ -18,17 +18,17 @@ export TEXMFCNF OFMFONTS
ligfiles='ligall ligbch ligblb ligbdy'
-for f in $ligfiles; do
-
-echo && echo "*** opl2ofm $f x$f"
-$_omfonts -opl2ofm $srcdir/$tests/$f $tests/x$f || rc=1
+rc=0
-echo && echo "*** ofm2opl x$f x$f"
-$_omfonts -ofm2opl $tests/x$f $tests/x$f || rc=2
+for f in $ligfiles; do
+ echo && echo "*** opl2ofm $f x$f"
+ $_omfonts -opl2ofm $srcdir/$tests/$f $tests/x$f || rc=1
-echo && echo "*** diff $f.opl x$f.opl"
-diff $srcdir/$tests/$f.opl $tests/x$f.opl || rc=3
+ echo && echo "*** ofm2opl x$f x$f"
+ $_omfonts -ofm2opl $tests/x$f $tests/x$f || rc=2
+ echo && echo "*** diff $f.opl x$f.opl"
+ diff $srcdir/$tests/$f.opl $tests/x$f.opl || rc=3
done
echo && echo "*** ovp2ovf ligblv xligblv xligblv"
diff --git a/Build/source/texk/web2c/omegaware/ligkern.test b/Build/source/texk/web2c/omegaware/ligkern.test
index 57ca32e2d7f..03a3a79cc59 100755
--- a/Build/source/texk/web2c/omegaware/ligkern.test
+++ b/Build/source/texk/web2c/omegaware/ligkern.test
@@ -1,6 +1,6 @@
#! /bin/sh -vx
# $Id$
-# Copyright 2017-2018 Karl Berry <tex-live@tug.org>
+# Copyright 2017-2023 Karl Berry <tex-live@tug.org>
# Copyright 2014 Peter Breitenlohner <tex-live@tug.org>
# You may freely use, modify and/or distribute this file.