e946be
diff -up texlive-20180414/source/texk/dvipsk/writet1.c.CVE-2018-17407 texlive-20180414/source/texk/dvipsk/writet1.c
e946be
--- texlive-20180414/source/texk/dvipsk/writet1.c.CVE-2018-17407	2018-09-26 08:37:29.964110003 +0100
e946be
+++ texlive-20180414/source/texk/dvipsk/writet1.c	2018-09-26 08:38:06.454784619 +0100
e946be
@@ -1449,7 +1449,9 @@ static void t1_check_unusual_charstring(
e946be
         *(strend(t1_buf_array) - 1) = ' ';
e946be
 
e946be
         t1_getline();
e946be
+        alloc_array(t1_buf, strlen(t1_line_array) + strlen(t1_buf_array) + 1, T1_BUF_SIZE);
e946be
         strcat(t1_buf_array, t1_line_array);
e946be
+        alloc_array(t1_line, strlen(t1_buf_array) + 1, T1_BUF_SIZE);
e946be
         strcpy(t1_line_array, t1_buf_array);
e946be
         t1_line_ptr = eol(t1_line_array);
e946be
     }
e946be
diff -up texlive-20180414/source/texk/web2c/luatexdir/font/writet1.w.CVE-2018-17407 texlive-20180414/source/texk/web2c/luatexdir/font/writet1.w
e946be
--- texlive-20180414/source/texk/web2c/luatexdir/font/writet1.w.CVE-2018-17407	2018-09-26 08:34:35.340880599 +0100
e946be
+++ texlive-20180414/source/texk/web2c/luatexdir/font/writet1.w	2018-09-26 08:35:45.992187544 +0100
e946be
@@ -1624,8 +1624,10 @@ static void t1_check_unusual_charstring(
e946be
     /* if no number follows "/CharStrings", let's read the next line */
e946be
     if (sscanf(p, "%i", &i) != 1) {
e946be
         strcpy(t1_buf_array, t1_line_array);
e946be
+        alloc_array(t1_buf, strlen(t1_line_array) + strlen(t1_buf_array) + 1, T1_BUF_SIZE);
e946be
         t1_getline();
e946be
         strcat(t1_buf_array, t1_line_array);
e946be
+        alloc_array(t1_line, strlen(t1_buf_array) + 1, T1_BUF_SIZE);
e946be
         strcpy(t1_line_array, t1_buf_array);
e946be
         t1_line_ptr = eol(t1_line_array);
e946be
     }
e946be
diff -up texlive-20180414/source/texk/web2c/pdftexdir/writet1.c.CVE-2018-17407 texlive-20180414/source/texk/web2c/pdftexdir/writet1.c
e946be
--- texlive-20180414/source/texk/web2c/pdftexdir/writet1.c.CVE-2018-17407	2018-09-26 08:36:06.382564736 +0100
e946be
+++ texlive-20180414/source/texk/web2c/pdftexdir/writet1.c	2018-09-26 08:37:12.213781850 +0100
e946be
@@ -1598,7 +1598,9 @@ static void t1_check_unusual_charstring(
e946be
         *(strend(t1_buf_array) - 1) = ' ';
e946be
 
e946be
         t1_getline();
e946be
+        alloc_array(t1_buf, strlen(t1_line_array) + strlen(t1_buf_array) + 1, T1_BUF_SIZE);
e946be
         strcat(t1_buf_array, t1_line_array);
e946be
+        alloc_array(t1_line, strlen(t1_buf_array) + 1, T1_BUF_SIZE);
e946be
         strcpy(t1_line_array, t1_buf_array);
e946be
         t1_line_ptr = eol(t1_line_array);
e946be
     }