texlive[57371] Build/source/texk/dvipdfm-x: Fix a bug causing a

commits+kakuto at tug.org commits+kakuto at tug.org
Sun Jan 10 05:50:29 CET 2021


Revision: 57371
          http://tug.org/svn/texlive?view=revision&revision=57371
Author:   kakuto
Date:     2021-01-10 05:50:28 +0100 (Sun, 10 Jan 2021)
Log Message:
-----------
Fix a bug causing a segfault reported as dvipdfmx-upjf.test test
failure (S. Hirata)

Modified Paths:
--------------
    trunk/Build/source/texk/dvipdfm-x/ChangeLog
    trunk/Build/source/texk/dvipdfm-x/cmap_read.c
    trunk/Build/source/texk/dvipdfm-x/t1_load.c

Modified: trunk/Build/source/texk/dvipdfm-x/ChangeLog
===================================================================
--- trunk/Build/source/texk/dvipdfm-x/ChangeLog	2021-01-10 00:54:06 UTC (rev 57370)
+++ trunk/Build/source/texk/dvipdfm-x/ChangeLog	2021-01-10 04:50:28 UTC (rev 57371)
@@ -1,3 +1,9 @@
+2021-01-10  Shunsaku Hirata  <shunsaku.hirata74 at 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 at gmail.com>
 
 	* cidtype0.c, cidtype2.c, pdffont.[ch], type0.c: Fix a bug

Modified: trunk/Build/source/texk/dvipdfm-x/cmap_read.c
===================================================================
--- trunk/Build/source/texk/dvipdfm-x/cmap_read.c	2021-01-10 00:54:06 UTC (rev 57370)
+++ trunk/Build/source/texk/dvipdfm-x/cmap_read.c	2021-01-10 04:50:28 UTC (rev 57371)
@@ -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 at kettering.edu>
@@ -401,8 +401,8 @@
 }
 
 
-#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)

Modified: trunk/Build/source/texk/dvipdfm-x/t1_load.c
===================================================================
--- trunk/Build/source/texk/dvipdfm-x/t1_load.c	2021-01-10 00:54:06 UTC (rev 57370)
+++ trunk/Build/source/texk/dvipdfm-x/t1_load.c	2021-01-10 04:50:28 UTC (rev 57371)
@@ -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 at kettering.edu>
@@ -89,8 +89,8 @@
 }
 /* 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));\



More information about the tex-live-commits mailing list.