Skip to content

Commit f1211fe

Browse files
committed
writet1.(c,w) of dvips, pdftex, luatex: protect against buffer overflow
git-svn-id: svn://tug.org/texlive/branches/branch2018/Build/source@48688 c570f23f-e606-0410-a88d-b1316a301751
1 parent 6d32e59 commit f1211fe

File tree

6 files changed

+21
-0
lines changed

6 files changed

+21
-0
lines changed

texk/dvipsk/ChangeLog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
2018-09-18 Norbert Preining <preining@logic.at>
2+
3+
* writet1.c (t1_check_unusual_charstring): protect against buffer
4+
overflow.
5+
16
2018-04-14 Karl Berry <karl@tug.org>
27

38
* Version 5.998 for TeX Live 2018 release.

texk/dvipsk/writet1.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1449,7 +1449,9 @@ static void t1_check_unusual_charstring(void)
14491449
*(strend(t1_buf_array) - 1) = ' ';
14501450

14511451
t1_getline();
1452+
alloc_array(t1_buf, strlen(t1_line_array) + strlen(t1_buf_array) + 1, T1_BUF_SIZE);
14521453
strcat(t1_buf_array, t1_line_array);
1454+
alloc_array(t1_line, strlen(t1_buf_array) + 1, T1_BUF_SIZE);
14531455
strcpy(t1_line_array, t1_buf_array);
14541456
t1_line_ptr = eol(t1_line_array);
14551457
}

texk/web2c/luatexdir/ChangeLog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
2018-09-18 Norbert Preining <preining@logic.at>
2+
3+
* fonts/writet1.w (t1_check_unusual_charstring): protect against
4+
buffer overflow.
5+
16
2017-11-02 Luigi Scarso <luigi.scarso@gmail.com>
27
LuaFilesystem 1.7.0
38

texk/web2c/luatexdir/font/writet1.w

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1625,7 +1625,9 @@ static void t1_check_unusual_charstring(void)
16251625
if (sscanf(p, "%i", &i) != 1) {
16261626
strcpy(t1_buf_array, t1_line_array);
16271627
t1_getline();
1628+
alloc_array(t1_buf, strlen(t1_line_array) + strlen(t1_buf_array) + 1, T1_BUF_SIZE);
16281629
strcat(t1_buf_array, t1_line_array);
1630+
alloc_array(t1_line, strlen(t1_buf_array) + 1, T1_BUF_SIZE);
16291631
strcpy(t1_line_array, t1_buf_array);
16301632
t1_line_ptr = eol(t1_line_array);
16311633
}

texk/web2c/pdftexdir/ChangeLog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
2018-09-18 Norbert Preining <preining@logic.at>
2+
3+
* writet1.c (t1_check_unusual_charstring): protect against buffer
4+
overflow.
5+
16
2018-04-14 Karl Berry <karl@tug.org>
27

38
* TeX Live 2018 release, pdftex 1.40.19.

texk/web2c/pdftexdir/writet1.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1598,7 +1598,9 @@ static void t1_check_unusual_charstring(void)
15981598
*(strend(t1_buf_array) - 1) = ' ';
15991599

16001600
t1_getline();
1601+
alloc_array(t1_buf, strlen(t1_line_array) + strlen(t1_buf_array) + 1, T1_BUF_SIZE);
16011602
strcat(t1_buf_array, t1_line_array);
1603+
alloc_array(t1_line, strlen(t1_buf_array) + 1, T1_BUF_SIZE);
16021604
strcpy(t1_line_array, t1_buf_array);
16031605
t1_line_ptr = eol(t1_line_array);
16041606
}

0 commit comments

Comments
 (0)