From 32bc43e7741dabb4de08a2de6dcfd7b0de1786b8 Mon Sep 17 00:00:00 2001 From: Akira Kakuto Date: Sat, 30 Mar 2019 03:42:07 +0000 Subject: discard too long a mapline git-svn-id: svn://tug.org/texlive/trunk@50651 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/dvipdfm-x/spc_pdfm.c | 7 +++++-- Build/source/texk/dvipdfm-x/spc_xtx.c | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) (limited to 'Build') 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); -- cgit v1.2.3