diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2020-01-24 10:00:38 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2020-01-24 10:00:38 +0000 |
commit | d5e02a3c654b675d1b86fc22a822fa03d884d1e2 (patch) | |
tree | dd6aa7c7d7c7c57a2d3ac4eb58c44d59071f8a3d /Build/source | |
parent | 0f4c4e52ee68dab1ab198e4712a8dcb8771dc05d (diff) |
Forgot to null-terminate strings in the previous changes
git-svn-id: svn://tug.org/texlive/trunk@53529 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source')
-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 |