summaryrefslogtreecommitdiff
path: root/Build/source/texk/dvipsk/writet1.c
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/texk/dvipsk/writet1.c')
-rw-r--r--Build/source/texk/dvipsk/writet1.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/Build/source/texk/dvipsk/writet1.c b/Build/source/texk/dvipsk/writet1.c
index 3b478b90084..73c03018c49 100644
--- a/Build/source/texk/dvipsk/writet1.c
+++ b/Build/source/texk/dvipsk/writet1.c
@@ -1,5 +1,5 @@
/*
-Copyright 1996-2013 Han The Thanh <thanh@pdftex.org>
+Copyright 1996-2018 Han The Thanh <thanh@pdftex.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -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);
+ alloc_array(t1_buf, strlen(t1_line_array)
+ + (t1_buf_array ? strlen(t1_buf_array) + 1 : 0),
+ 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);