texlive[42693] Build/source/texk/dvipsk/emspecial.c: dvipsk: Fix a

commits+kakuto at tug.org commits+kakuto at tug.org
Tue Dec 13 06:04:19 CET 2016


Revision: 42693
          http://tug.org/svn/texlive?view=revision&revision=42693
Author:   kakuto
Date:     2016-12-13 06:04:19 +0100 (Tue, 13 Dec 2016)
Log Message:
-----------
dvipsk: Fix a bug leading to wrong strlen (emstr). Thanks Norbert Klingen.

Modified Paths:
--------------
    trunk/Build/source/texk/dvipsk/emspecial.c

Modified: trunk/Build/source/texk/dvipsk/emspecial.c
===================================================================
--- trunk/Build/source/texk/dvipsk/emspecial.c	2016-12-13 04:18:45 UTC (rev 42692)
+++ trunk/Build/source/texk/dvipsk/emspecial.c	2016-12-13 05:04:19 UTC (rev 42693)
@@ -160,7 +160,6 @@
         for (k = 0; k < 500; k++)
             emstr[k] = '\0';
         }
-
         hvpos();
 	for (emp = p+3; *emp && isspace((unsigned char)*emp); emp++); /* skip blanks */
 	if (strncmp(emp, "linewidth", 9) == 0) {
@@ -292,7 +291,7 @@
 	   int i;
 	   for (emp = emp+5; *emp && isspace((unsigned char)*emp); emp++); /* skip blanks */
 	   for (i=0; *emp && !isspace((unsigned char)*emp) && !(*emp==','); emp++) {
-	      if (strlen(emstr) - 2 >= sizeof(emstr)) {
+	      if (strlen (emstr) > 499) {
                 fprintf(stderr, "em:graph: special too long, truncating\n");
                 break;
 	      }



More information about the tex-live-commits mailing list