From 6f69c15e7b8bfee16299f3f078b3546a9326e0b6 Mon Sep 17 00:00:00 2001 From: Akira Kakuto Date: Sun, 10 Jan 2021 04:50:28 +0000 Subject: 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 --- Build/source/texk/dvipdfm-x/t1_load.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Build/source/texk/dvipdfm-x/t1_load.c') 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 @@ -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));\ -- cgit v1.2.3