diff options
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); |