diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2021-01-10 04:50:28 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2021-01-10 04:50:28 +0000 |
commit | 6f69c15e7b8bfee16299f3f078b3546a9326e0b6 (patch) | |
tree | 3dccd7ca0f0c9b21092ce46e2b775060bf8f1dbb /Build/source/texk/dvipdfm-x | |
parent | 52f2223cd00d2bbbbc92ff41cbbc090a0d40497a (diff) |
Fix a bug causing a segfault reported as dvipdfmx-upjf.test test
failure (S. Hirata)
git-svn-id: svn://tug.org/texlive/trunk@57371 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/dvipdfm-x')
-rw-r--r-- | Build/source/texk/dvipdfm-x/ChangeLog | 6 | ||||
-rw-r--r-- | Build/source/texk/dvipdfm-x/cmap_read.c | 6 | ||||
-rw-r--r-- | Build/source/texk/dvipdfm-x/t1_load.c | 6 |
3 files changed, 12 insertions, 6 deletions
diff --git a/Build/source/texk/dvipdfm-x/ChangeLog b/Build/source/texk/dvipdfm-x/ChangeLog index 8f9d01f5643..4ad87b93d5e 100644 --- a/Build/source/texk/dvipdfm-x/ChangeLog +++ b/Build/source/texk/dvipdfm-x/ChangeLog @@ -1,3 +1,9 @@ +2021-01-10 Shunsaku Hirata <shunsaku.hirata74@gmail.com> + + * cmap_read.c, t1_load.c: Fix a bug causing a segfault + reported as dvipdfmx-upjf.test test failure. Add missing size + tests for the data comparison. + 2021-01-09 Shunsaku Hirata <shunsaku.hirata74@gmail.com> * cidtype0.c, cidtype2.c, pdffont.[ch], type0.c: Fix a bug diff --git a/Build/source/texk/dvipdfm-x/cmap_read.c b/Build/source/texk/dvipdfm-x/cmap_read.c index ec38e3745ed..14100cc3b35 100644 --- a/Build/source/texk/dvipdfm-x/cmap_read.c +++ b/Build/source/texk/dvipdfm-x/cmap_read.c @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2002-2020 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2002-2021 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. Copyright (C) 1998, 1999 by Mark A. Wicks <mwicks@kettering.edu> @@ -401,8 +401,8 @@ do_cidchar (CMap *cmap, ifreader *input, int count) } -#define MATCH_NAME(t,n) (PST_NAMETYPE((t)) && !memcmp(pst_data_ptr((t)),(n),strlen((n)))) -#define MATCH_OP(t,n) (PST_UNKNOWNTYPE((t)) && !memcmp(pst_data_ptr((t)),(n),strlen((n)))) +#define MATCH_NAME(t,n) (PST_NAMETYPE((t)) && (pst_length_of((t)) == strlen((n))) && !memcmp(pst_data_ptr((t)),(n),strlen((n)))) +#define MATCH_OP(t,n) (PST_UNKNOWNTYPE((t)) && (pst_length_of((t)) == strlen((n))) && !memcmp(pst_data_ptr((t)),(n),strlen((n)))) static int do_cidsysteminfo (CMap *cmap, ifreader *input) diff --git a/Build/source/texk/dvipdfm-x/t1_load.c b/Build/source/texk/dvipdfm-x/t1_load.c index ca03bbe3c3f..2a72f806614 100644 --- a/Build/source/texk/dvipdfm-x/t1_load.c +++ b/Build/source/texk/dvipdfm-x/t1_load.c @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2002-2020 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2002-2021 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. Copyright (C) 1998, 1999 by Mark A. Wicks <mwicks@kettering.edu> @@ -89,8 +89,8 @@ t1_decrypt (unsigned short key, } /* T1CRYPT */ -#define MATCH_NAME(t,n) ((t) && PST_NAMETYPE((t)) && !strncmp(pst_data_ptr((t)),(n),strlen((n)))) -#define MATCH_OP(t,n) ((t) && PST_UNKNOWNTYPE((t)) && !strncmp(pst_data_ptr((t)),(n),strlen((n)))) +#define MATCH_NAME(t,n) (PST_NAMETYPE((t)) && (pst_length_of((t)) == strlen((n))) && !memcmp(pst_data_ptr((t)),(n),strlen((n)))) +#define MATCH_OP(t,n) (PST_UNKNOWNTYPE((t)) && (pst_length_of((t)) == strlen((n))) && !memcmp(pst_data_ptr((t)),(n),strlen((n)))) #define RELEASE_TOK(t) if ((t) != NULL) {\ pst_release_obj((t));\ |