Blame SOURCES/texlive-20180414-CVE-2018-17407.patch

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