diff options
Diffstat (limited to 'Build/source/texk')
-rw-r--r-- | Build/source/texk/dvipdfm-x/ChangeLog | 9 | ||||
-rw-r--r-- | Build/source/texk/dvipdfm-x/pdfobj.c | 10 |
2 files changed, 14 insertions, 5 deletions
diff --git a/Build/source/texk/dvipdfm-x/ChangeLog b/Build/source/texk/dvipdfm-x/ChangeLog index db3de86ee15..395a88b458c 100644 --- a/Build/source/texk/dvipdfm-x/ChangeLog +++ b/Build/source/texk/dvipdfm-x/ChangeLog @@ -1,3 +1,12 @@ +2020-02-06 Shunsaku Hirata <shunsaku.hirata74@gmail.com> + + * pdfobj.c: In pdf_new_string(), the supplied string was + checked and dvipdfmx aborted when it was NULL. This check + is removed since it is actually not necessary. The string is + regarded simply as an empty string if it is NULL from now on. + See https://tex.stackexchange.com/questions/522794/problem-in-updated-tex-live, + although we can't reproduce the problem. + 2020-01-24 Akira Kakuto <kakuto@w32tex.org> * dvi.c: Forgot to null-terminate strings in the previous diff --git a/Build/source/texk/dvipdfm-x/pdfobj.c b/Build/source/texk/dvipdfm-x/pdfobj.c index 50246fc7ede..fc977d2a06f 100644 --- a/Build/source/texk/dvipdfm-x/pdfobj.c +++ b/Build/source/texk/dvipdfm-x/pdfobj.c @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2007-2019 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2007-2020 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. Copyright (C) 1998, 1999 by Mark A. Wicks <mwicks@kettering.edu> @@ -938,20 +938,20 @@ pdf_new_string (const void *str, unsigned length) pdf_obj *result; pdf_string *data; - ASSERT(str); - result = pdf_new_obj(PDF_STRING); data = NEW(1, pdf_string); result->data = data; data->length = length; - if (length) { + if (str && length > 0) { data->string = NEW(length+1, unsigned char); memcpy(data->string, str, length); /* Shouldn't assume NULL terminated. */ data->string[length] = '\0'; - } else + } else { data->string = NULL; + data->length = 0; + } return result; } |