diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2019-03-30 03:42:07 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2019-03-30 03:42:07 +0000 |
commit | 32bc43e7741dabb4de08a2de6dcfd7b0de1786b8 (patch) | |
tree | c72cacdab8200e12504bde1e2984fa2e38e0a16a /Build | |
parent | 65969e10793eca240081c7f36b6b844c243dba00 (diff) |
discard too long a mapline
git-svn-id: svn://tug.org/texlive/trunk@50651 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r-- | Build/source/texk/dvipdfm-x/spc_pdfm.c | 7 | ||||
-rw-r--r-- | Build/source/texk/dvipdfm-x/spc_xtx.c | 7 |
2 files changed, 10 insertions, 4 deletions
diff --git a/Build/source/texk/dvipdfm-x/spc_pdfm.c b/Build/source/texk/dvipdfm-x/spc_pdfm.c index a5e8d10b928..f19d9a081cb 100644 --- a/Build/source/texk/dvipdfm-x/spc_pdfm.c +++ b/Build/source/texk/dvipdfm-x/spc_pdfm.c @@ -1807,8 +1807,11 @@ spc_handler_pdfm_mapline (struct spc_env *spe, struct spc_arg *ap) *q++ = *p++; count++; } - if (count == THEBUFFLENGTH - 1) - spc_warn(spe, "Too long a fontmap line."); + if (count == THEBUFFLENGTH - 1) { + spc_warn(spe, "Invalid fontmap line: Too long a line."); + *q = 0; + return -1; + } *q = '\0'; mrec = NEW(1, fontmap_rec); pdf_init_fontmap_record(mrec); diff --git a/Build/source/texk/dvipdfm-x/spc_xtx.c b/Build/source/texk/dvipdfm-x/spc_xtx.c index 33d43d60743..f80dd83eb40 100644 --- a/Build/source/texk/dvipdfm-x/spc_xtx.c +++ b/Build/source/texk/dvipdfm-x/spc_xtx.c @@ -238,8 +238,11 @@ spc_handler_xtx_fontmapline (struct spc_env *spe, struct spc_arg *ap) *q++ = *p++; count++; } - if (count == THEBUFFLENGTH - 1) - spc_warn(spe, "Too long a fontmap line."); + if (count == THEBUFFLENGTH - 1) { + spc_warn(spe, "Invalid fontmap line: Too long a line."); + *q = 0; + return -1; + } *q = '\0'; mrec = NEW(1, fontmap_rec); pdf_init_fontmap_record(mrec); |