diff options
author | riastradh <riastradh@pkgsrc.org> | 2022-04-05 10:01:06 +0000 |
---|---|---|
committer | riastradh <riastradh@pkgsrc.org> | 2022-04-05 10:01:06 +0000 |
commit | bc0075384cc7bf9bdb385d6830c9826aac4558d9 (patch) | |
tree | 3fccd517f7102d055d1526f5bd332a0b9fd5d9ae | |
parent | b769872950fd07afd02d3a2bf447715e31554549 (diff) | |
download | pkgsrc-bc0075384cc7bf9bdb385d6830c9826aac4558d9.tar.gz |
x11/motif: Patch more ctype(3) abuse.
-rw-r--r-- | x11/motif/distinfo | 6 | ||||
-rw-r--r-- | x11/motif/patches/patch-clients_mwm_WmMenu.c | 61 | ||||
-rw-r--r-- | x11/motif/patches/patch-clients_mwm_WmResParse.c | 24 | ||||
-rw-r--r-- | x11/motif/patches/patch-clients_mwm_WmXSMP.c | 15 | ||||
-rw-r--r-- | x11/motif/patches/patch-clients_uil_UilSymStor.c | 15 |
5 files changed, 120 insertions, 1 deletions
diff --git a/x11/motif/distinfo b/x11/motif/distinfo index 38e5135e510..cdf4a693e5d 100644 --- a/x11/motif/distinfo +++ b/x11/motif/distinfo @@ -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 --git a/x11/motif/patches/patch-clients_mwm_WmMenu.c b/x11/motif/patches/patch-clients_mwm_WmMenu.c new file mode 100644 index 00000000000..65dadc0012d --- /dev/null +++ b/x11/motif/patches/patch-clients_mwm_WmMenu.c @@ -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 --git a/x11/motif/patches/patch-clients_mwm_WmResParse.c b/x11/motif/patches/patch-clients_mwm_WmResParse.c new file mode 100644 index 00000000000..93709e913f8 --- /dev/null +++ b/x11/motif/patches/patch-clients_mwm_WmResParse.c @@ -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 --git a/x11/motif/patches/patch-clients_mwm_WmXSMP.c b/x11/motif/patches/patch-clients_mwm_WmXSMP.c new file mode 100644 index 00000000000..d24af72cdd0 --- /dev/null +++ b/x11/motif/patches/patch-clients_mwm_WmXSMP.c @@ -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 --git a/x11/motif/patches/patch-clients_uil_UilSymStor.c b/x11/motif/patches/patch-clients_uil_UilSymStor.c new file mode 100644 index 00000000000..8d862790499 --- /dev/null +++ b/x11/motif/patches/patch-clients_uil_UilSymStor.c @@ -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 ] = '.'; + } + |