pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/x11/motif x11/motif: Patch more ctype(3) abuse.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/b90531e6c874
branches:  trunk
changeset: 376315:b90531e6c874
user:      riastradh <riastradh%pkgsrc.org@localhost>
date:      Tue Apr 05 10:01:06 2022 +0000

description:
x11/motif: Patch more ctype(3) abuse.

diffstat:

 x11/motif/distinfo                               |   6 +-
 x11/motif/patches/patch-clients_mwm_WmMenu.c     |  61 ++++++++++++++++++++++++
 x11/motif/patches/patch-clients_mwm_WmResParse.c |  24 +++++++++
 x11/motif/patches/patch-clients_mwm_WmXSMP.c     |  15 +++++
 x11/motif/patches/patch-clients_uil_UilSymStor.c |  15 +++++
 5 files changed, 120 insertions(+), 1 deletions(-)

diffs (152 lines):

diff -r c422c5762343 -r b90531e6c874 x11/motif/distinfo
--- a/x11/motif/distinfo        Tue Apr 05 10:00:21 2022 +0000
+++ b/x11/motif/distinfo        Tue Apr 05 10:01:06 2022 +0000
@@ -1,12 +1,16 @@
-$NetBSD: distinfo,v 1.12 2022/04/05 10:00:21 riastradh Exp $
+$NetBSD: distinfo,v 1.13 2022/04/05 10:01:06 riastradh Exp $
 
 BLAKE2s (motif-2.3.8.tar.gz) = b82ee8dac7a840aaa0f364e5b5c018d053a1eb42433e52e5b54f7742d34cbb23
 SHA512 (motif-2.3.8.tar.gz) = 1ab8e8eece25ef97e948592b5fa3e19d98e932695290a18b7a8e90f1aa2766bc4f082bdbc3999dff5660e684821178a149040f76bb477163e53ca06474d02b55
 Size (motif-2.3.8.tar.gz) = 5704328 bytes
 SHA1 (patch-Makefile.in) = 9f4573cd47989a821ea616df53da924766fe3d39
+SHA1 (patch-clients_mwm_WmMenu.c) = ce05e4c5650430501b6e1a54249e1a7df2cfc7ef
+SHA1 (patch-clients_mwm_WmResParse.c) = e0a4be8955d386114bb96f794ef2eb31496411aa
+SHA1 (patch-clients_mwm_WmXSMP.c) = ebe22e67a6550438289c70820dac67627e325082
 SHA1 (patch-clients_uil_UilDB.c) = 781b52e915e667eeb02359a51cfeefdb9556c4dd
 SHA1 (patch-clients_uil_UilDefI.h) = 6447a306809e65b4993d79e14a989a01aed2e0bc
 SHA1 (patch-clients_uil_UilDiags.c) = 39ac8307219b435baf3d1bf829809fcb6536b1a9
+SHA1 (patch-clients_uil_UilSymStor.c) = dbe0264118624f1184553e7696e4ee4f06f73db7
 SHA1 (patch-config_util_Makefile.in) = 38ee59c863c4fd1220850c9f35379d305611623a
 SHA1 (patch-doc_man_man3_Makefile.am) = b396f5e1235834f507a415c62b0efaa939943f1d
 SHA1 (patch-doc_man_man4_Makefile.am) = 154071494cf54a65e2e266861c81771a14156cae
diff -r c422c5762343 -r b90531e6c874 x11/motif/patches/patch-clients_mwm_WmMenu.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/x11/motif/patches/patch-clients_mwm_WmMenu.c      Tue Apr 05 10:01:06 2022 +0000
@@ -0,0 +1,61 @@
+$NetBSD: patch-clients_mwm_WmMenu.c,v 1.1 2022/04/05 10:01:06 riastradh Exp $
+
+Fix ctype(3) abuse.
+
+--- clients/mwm/WmMenu.c.orig  2017-08-17 00:38:43.000000000 +0000
++++ clients/mwm/WmMenu.c
+@@ -933,8 +933,8 @@ static MenuItem *PerformClientCommandMat
+       /* Skip past the '<' at the beginning of the next segment and
+          any whitespace. */
+       ++menuItemCommand; ++clientCommand;
+-      while (isspace(*menuItemCommand)) ++menuItemCommand;
+-      while (isspace(*clientCommand)) ++clientCommand;
++      while (isspace((unsigned char)*menuItemCommand)) ++menuItemCommand;
++      while (isspace((unsigned char)*clientCommand)) ++clientCommand;
+       
+       /* First check whether the current menuItemCommand segment is
+          a wildcard. */
+@@ -946,7 +946,7 @@ static MenuItem *PerformClientCommandMat
+              the client command. */
+           wildcardPositions[wildcards++] = segments;
+           ++menuItemCommand;
+-          while (isspace(*menuItemCommand)) ++menuItemCommand;
++          while (isspace((unsigned char)*menuItemCommand)) ++menuItemCommand;
+           while (*clientCommand != '>' && *clientCommand != '\0')
+             ++clientCommand;
+           foundWildcard = TRUE;
+@@ -967,7 +967,7 @@ static MenuItem *PerformClientCommandMat
+           /* Get rid of trailing white space on the segment. */
+           for (; seglength > 0; --seglength)
+           {
+-              if (!isspace(menuItemCommand[seglength - 1]))
++              if (!isspace((unsigned char)menuItemCommand[seglength - 1]))
+                 break;
+           }
+           
+@@ -980,14 +980,14 @@ static MenuItem *PerformClientCommandMat
+                  have anything but whitespace after its seglength
+                  character. */
+               clientCommand += seglength;
+-              while (isspace(*clientCommand)) ++clientCommand;
++              while (isspace((unsigned char)*clientCommand)) ++clientCommand;
+               if (*clientCommand != '>') return(bestMatchSoFar);
+               
+               /* We have a match. Clear the foundWildcard since we
+                  have sync'ed up and keep trying to match. */
+               foundWildcard = FALSE;
+               menuItemCommand += seglength;
+-              while (isspace(*menuItemCommand)) ++menuItemCommand;
++              while (isspace((unsigned char)*menuItemCommand)) ++menuItemCommand;
+           }
+           else if (foundWildcard == FALSE)
+           {
+@@ -1056,7 +1056,7 @@ static MenuItem *PerformClientCommandMat
+       /* Skip past the '<' at the beginning of the next segment and
+          any whitespace. */
+       ++bestMatchStr;
+-      while (isspace(*bestMatchStr)) ++bestMatchStr;
++      while (isspace((unsigned char)*bestMatchStr)) ++bestMatchStr;
+       
+       /* First check whether the current bestMatchStr segment is
+          a wildcard. @RGC: We are assuming that there is nothing
diff -r c422c5762343 -r b90531e6c874 x11/motif/patches/patch-clients_mwm_WmResParse.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/x11/motif/patches/patch-clients_mwm_WmResParse.c  Tue Apr 05 10:01:06 2022 +0000
@@ -0,0 +1,24 @@
+$NetBSD: patch-clients_mwm_WmResParse.c,v 1.1 2022/04/05 10:01:06 riastradh Exp $
+
+Fix ctype(3) abuse.
+
+--- clients/mwm/WmResParse.c.orig      2017-08-17 00:38:43.000000000 +0000
++++ clients/mwm/WmResParse.c
+@@ -3329,7 +3329,7 @@ static Boolean ParseClientCommand (unsig
+ #ifndef NO_MULTIBYTE
+                          mblen ((char *)stream, MB_CUR_MAX) == 1 &&
+ #endif
+-                         (isalnum(*stream) || *stream == ' ' ||
++                         (isalnum((unsigned char)*stream) || *stream == ' ' ||
+                           *stream == '\t'  || *stream == '_' ))
+                     ++stream;
+               }
+@@ -6449,7 +6449,7 @@ static Boolean ParseKeySym (unsigned cha
+     if ((*detail = XStringToKeysym(keySymName)) == NoSymbol)
+ #endif
+     {
+-        if (!isdigit (keySymName[0]) ||
++        if (!isdigit ((unsigned char)keySymName[0]) ||
+             ((*detail = StrToNum ((unsigned char *)&keySymName[0])) == -1))
+         {
+             *detail = NoSymbol;
diff -r c422c5762343 -r b90531e6c874 x11/motif/patches/patch-clients_mwm_WmXSMP.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/x11/motif/patches/patch-clients_mwm_WmXSMP.c      Tue Apr 05 10:01:06 2022 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-clients_mwm_WmXSMP.c,v 1.1 2022/04/05 10:01:06 riastradh Exp $
+
+Fix ctype(3) abuse.
+
+--- clients/mwm/WmXSMP.c.orig  2017-08-17 00:38:43.000000000 +0000
++++ clients/mwm/WmXSMP.c
+@@ -381,7 +381,7 @@ setClientDBName(void)
+ 
+       for (p1 = ++ptr; *p1 != '\0'; p1++)
+       {
+-          if (!isdigit(*p1))
++          if (!isdigit((unsigned char)*p1))
+               break;
+       }
+ 
diff -r c422c5762343 -r b90531e6c874 x11/motif/patches/patch-clients_uil_UilSymStor.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/x11/motif/patches/patch-clients_uil_UilSymStor.c  Tue Apr 05 10:01:06 2022 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-clients_uil_UilSymStor.c,v 1.1 2022/04/05 10:01:06 riastradh Exp $
+
+Fix ctype(3) abuse.
+
+--- clients/uil/UilSymStor.c.orig      2017-08-17 00:38:43.000000000 +0000
++++ clients/uil/UilSymStor.c
+@@ -1716,7 +1716,7 @@ output_text(XmConst int length, XmConst 
+ 
+       for (i=0;  i<last;  i++)
+       {
+-          if (iscntrl( c_buffer[ i ] ))
++          if (iscntrl( (unsigned char)c_buffer[ i ] ))
+               c_buffer[ i ] = '.';
+       }
+ 



Home | Main Index | Thread Index | Old Index