summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-04-30 01:34:42 +0000
committerKarl Berry <karl@freefriends.org>2019-04-30 01:34:42 +0000
commitca64a3a353b21327e7afb0a6c020cdbee67e409c (patch)
treea605a4b378069d42fdaad01266964979e4436e1e
parent4a0a61cd7c6089744b31e8837c83a1cd2f5dc572 (diff)
close postscript string constant on long input filenames
git-svn-id: svn://tug.org/texlive/trunk@50901 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Build/source/texk/dvipsk/ChangeLog6
-rw-r--r--Build/source/texk/dvipsk/dosection.c6
2 files changed, 10 insertions, 2 deletions
diff --git a/Build/source/texk/dvipsk/ChangeLog b/Build/source/texk/dvipsk/ChangeLog
index 84fdfa17247..c307a6f7d87 100644
--- a/Build/source/texk/dvipsk/ChangeLog
+++ b/Build/source/texk/dvipsk/ChangeLog
@@ -1,3 +1,9 @@
+2019-04-30 Karl Berry <karl@tug.org>
+
+ * dosection.c (dosection): close PostScript string constant
+ for long filenames. tex-k mail from Arnaud Blouin,
+ 24 Apr 2019 13:54:10.
+
2019-04-07 Karl Berry <karl@freefriends.org>
* TeX Live 2019.
diff --git a/Build/source/texk/dvipsk/dosection.c b/Build/source/texk/dvipsk/dosection.c
index 4ece3bce5a1..1ebc163813d 100644
--- a/Build/source/texk/dvipsk/dosection.c
+++ b/Build/source/texk/dvipsk/dosection.c
@@ -23,7 +23,7 @@ dosection(sectiontype *s, int c)
int np;
int k;
integer thispage = 0;
- char buf[104];
+ char buf[300]; /* really 253 */
dopsfont(s);
#ifdef HPS
@@ -40,7 +40,9 @@ dosection(sectiontype *s, int c)
doubleout(mag);
numout((integer)DPI);
numout((integer)VDPI);
- snprintf(buf, sizeof(buf), "(%.500s)", fulliname);
+ /* possibly lines in eps files are supposed to be <= 255;
+ not worth testing the limits merely to output a long file name. */
+ snprintf(buf, sizeof(buf), "(%.250s)", fulliname);
cmdout(buf);
newline();
cmdout("@start");