From 945e3295915cf8a3cbd54872724cab28530e120f Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Wed, 19 Sep 2018 04:02:06 +0000 Subject: writet1 protection against buffer overflow git-svn-id: svn://tug.org/texlive/trunk@48697 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/web2c/pdftexdir/ChangeLog | 5 +++++ Build/source/texk/web2c/pdftexdir/writet1.c | 2 ++ 2 files changed, 7 insertions(+) (limited to 'Build/source/texk/web2c/pdftexdir') diff --git a/Build/source/texk/web2c/pdftexdir/ChangeLog b/Build/source/texk/web2c/pdftexdir/ChangeLog index 9fbb8114909..6e936a0610a 100644 --- a/Build/source/texk/web2c/pdftexdir/ChangeLog +++ b/Build/source/texk/web2c/pdftexdir/ChangeLog @@ -1,3 +1,8 @@ +2018-09-18 Nick Roessler + + * writet1.c (t1_check_unusual_charstring): protect against buffer + overflow. + 2018-09-09 Karl Berry * expanded.test, diff --git a/Build/source/texk/web2c/pdftexdir/writet1.c b/Build/source/texk/web2c/pdftexdir/writet1.c index d191b77ee5f..8cfc2616ca3 100644 --- a/Build/source/texk/web2c/pdftexdir/writet1.c +++ b/Build/source/texk/web2c/pdftexdir/writet1.c @@ -1598,7 +1598,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); } -- cgit v1.2.3