summaryrefslogtreecommitdiff
path: root/Build/source/texk/dvipsk
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2018-09-19 04:02:06 +0000
committerNorbert Preining <preining@logic.at>2018-09-19 04:02:06 +0000
commit945e3295915cf8a3cbd54872724cab28530e120f (patch)
treed33dc2ce0c046f2ff36c54e5d871ab43207dab96 /Build/source/texk/dvipsk
parent977b5f9cac35f42e2409b60d6e793a3327d54647 (diff)
writet1 protection against buffer overflow
git-svn-id: svn://tug.org/texlive/trunk@48697 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/dvipsk')
-rw-r--r--Build/source/texk/dvipsk/ChangeLog5
-rw-r--r--Build/source/texk/dvipsk/writet1.c2
2 files changed, 7 insertions, 0 deletions
diff --git a/Build/source/texk/dvipsk/ChangeLog b/Build/source/texk/dvipsk/ChangeLog
index 88faea44775..bbce8fb3f86 100644
--- a/Build/source/texk/dvipsk/ChangeLog
+++ b/Build/source/texk/dvipsk/ChangeLog
@@ -1,3 +1,8 @@
+2018-09-18 Nick Roessler <nicholas.e.roessler@gmail.com>
+
+ * writet1.c (t1_check_unusual_charstring): protect against buffer
+ overflow.
+
2018-04-14 Karl Berry <karl@tug.org>
* Version 5.998 for TeX Live 2018 release.
diff --git a/Build/source/texk/dvipsk/writet1.c b/Build/source/texk/dvipsk/writet1.c
index 0fcf269070b..3b478b90084 100644
--- a/Build/source/texk/dvipsk/writet1.c
+++ b/Build/source/texk/dvipsk/writet1.c
@@ -1449,7 +1449,9 @@ static void t1_check_unusual_charstring(void)
*(strend(t1_buf_array) - 1) = ' ';
t1_getline();
+ alloc_array(t1_buf, strlen(t1_line_array) + strlen(t1_buf_array) + 1, T1_BUF_SIZE);
strcat(t1_buf_array, t1_line_array);
+ alloc_array(t1_line, strlen(t1_buf_array) + 1, T1_BUF_SIZE);
strcpy(t1_line_array, t1_buf_array);
t1_line_ptr = eol(t1_line_array);
}