diff options
-rw-r--r-- | Build/source/texk/dvipdfm-x/ChangeLog | 5 | ||||
-rw-r--r-- | Build/source/texk/dvipdfm-x/dvi.c | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/Build/source/texk/dvipdfm-x/ChangeLog b/Build/source/texk/dvipdfm-x/ChangeLog index a2c29bcf013..db3de86ee15 100644 --- a/Build/source/texk/dvipdfm-x/ChangeLog +++ b/Build/source/texk/dvipdfm-x/ChangeLog @@ -1,3 +1,8 @@ +2020-01-24 Akira Kakuto <kakuto@w32tex.org> + + * dvi.c: Forgot to null-terminate strings in the previous + changes. + 2020-01-22 Akira Kakuto <kakuto@w32tex.org> * dvi.c: Correct wrong sizes of opassword and upassword diff --git a/Build/source/texk/dvipdfm-x/dvi.c b/Build/source/texk/dvipdfm-x/dvi.c index 95022024718..51bc5533d4a 100644 --- a/Build/source/texk/dvipdfm-x/dvi.c +++ b/Build/source/texk/dvipdfm-x/dvi.c @@ -2285,6 +2285,7 @@ scan_special_encrypt (int *key_bits, int32_t *permission, char *opassword, char int str_length = (MAX_PWD_LEN - 1 > pdf_string_length(obj) ? pdf_string_length(obj) : MAX_PWD_LEN - 1); strncpy(opassword, pdf_string_value(obj), str_length); + opassword[str_length] = '\0'; } pdf_release_obj(obj); } else @@ -2295,6 +2296,7 @@ scan_special_encrypt (int *key_bits, int32_t *permission, char *opassword, char int str_length = (MAX_PWD_LEN - 1 > pdf_string_length(obj) ? pdf_string_length(obj) : MAX_PWD_LEN - 1); strncpy(upassword, pdf_string_value(obj), str_length); + upassword[str_length] = '\0'; } pdf_release_obj(obj); } else |