pkgsrc-Changes archive

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

CVS commit: pkgsrc/x11/libXaw



Module Name:    pkgsrc
Committed By:   riastradh
Date:           Mon Apr  4 12:42:19 UTC 2022

Modified Files:
        pkgsrc/x11/libXaw: Makefile distinfo
Added Files:
        pkgsrc/x11/libXaw/patches: patch-src_AsciiSrc.c patch-src_DisplayList.c
            patch-src_Panner.c patch-src_TextAction.c patch-src_TextSink.c
            patch-src_XawIm.c

Log Message:
x11/libXaw: Patch ctype(3) abuse.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 pkgsrc/x11/libXaw/Makefile
cvs rdiff -u -r1.14 -r1.15 pkgsrc/x11/libXaw/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/x11/libXaw/patches/patch-src_AsciiSrc.c \
    pkgsrc/x11/libXaw/patches/patch-src_DisplayList.c \
    pkgsrc/x11/libXaw/patches/patch-src_Panner.c \
    pkgsrc/x11/libXaw/patches/patch-src_TextAction.c \
    pkgsrc/x11/libXaw/patches/patch-src_TextSink.c \
    pkgsrc/x11/libXaw/patches/patch-src_XawIm.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/x11/libXaw/Makefile
diff -u pkgsrc/x11/libXaw/Makefile:1.17 pkgsrc/x11/libXaw/Makefile:1.18
--- pkgsrc/x11/libXaw/Makefile:1.17     Mon Mar 29 20:57:08 2021
+++ pkgsrc/x11/libXaw/Makefile  Mon Apr  4 12:42:19 2022
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.17 2021/03/29 20:57:08 wiz Exp $
+# $NetBSD: Makefile,v 1.18 2022/04/04 12:42:19 riastradh Exp $
 
 DISTNAME=              libXaw-1.0.14
+PKGREVISION=           1
 CATEGORIES=            graphics x11
 MASTER_SITES=          ${MASTER_SITE_XORG:=lib/}
 EXTRACT_SUFX=          .tar.bz2

Index: pkgsrc/x11/libXaw/distinfo
diff -u pkgsrc/x11/libXaw/distinfo:1.14 pkgsrc/x11/libXaw/distinfo:1.15
--- pkgsrc/x11/libXaw/distinfo:1.14     Tue Oct 26 11:34:05 2021
+++ pkgsrc/x11/libXaw/distinfo  Mon Apr  4 12:42:19 2022
@@ -1,7 +1,13 @@
-$NetBSD: distinfo,v 1.14 2021/10/26 11:34:05 nia Exp $
+$NetBSD: distinfo,v 1.15 2022/04/04 12:42:19 riastradh Exp $
 
 BLAKE2s (libXaw-1.0.14.tar.bz2) = d323174f3703ba71caafeb2a1cdfe611a036f683ab6a76d5320d93d8cd87665e
 SHA512 (libXaw-1.0.14.tar.bz2) = 29d1c151369523ae6cb418e636b0b7b39ccccc35462a0b394dbeb46d5b6d780badd2eb872a55d9fbba1ee1af034e76c0463f40f8d8a7be2c336d08b3b1bf81d4
 Size (libXaw-1.0.14.tar.bz2) = 690994 bytes
 SHA1 (patch-Makefile.in) = bc701f17befebb04c0062c6c670f85f48adfaabf
 SHA1 (patch-aa) = 9fdbdf625260763fc7345421870633ed3e4b6b7b
+SHA1 (patch-src_AsciiSrc.c) = 068d7ffeb3dd04493332f06b9d75609b054165c1
+SHA1 (patch-src_DisplayList.c) = 12bf34410eb3c791ee2de0c78adfcdc1d5a55117
+SHA1 (patch-src_Panner.c) = c9e168da7a4c4f20018d55ac9bb1b9fa0e6e363f
+SHA1 (patch-src_TextAction.c) = 458faf8dd1178f19e826e46062ccec6e725c6651
+SHA1 (patch-src_TextSink.c) = 0feee4b06d432dca348ed1356c529e2fb77af886
+SHA1 (patch-src_XawIm.c) = 25f4b44ffffa2d6fe82162c73c054dc0938773fd

Added files:

Index: pkgsrc/x11/libXaw/patches/patch-src_AsciiSrc.c
diff -u /dev/null pkgsrc/x11/libXaw/patches/patch-src_AsciiSrc.c:1.1
--- /dev/null   Mon Apr  4 12:42:19 2022
+++ pkgsrc/x11/libXaw/patches/patch-src_AsciiSrc.c      Mon Apr  4 12:42:19 2022
@@ -0,0 +1,28 @@
+$NetBSD: patch-src_AsciiSrc.c,v 1.1 2022/04/04 12:42:19 riastradh Exp $
+
+Fix ctype(3) abuse.
+
+--- src/AsciiSrc.c.orig        2021-03-27 17:40:21.000000000 +0000
++++ src/AsciiSrc.c
+@@ -857,8 +857,8 @@ Search(Widget w, register XawTextPositio
+       /*CONSTCOND*/
+       while (1) {
+           if (*ptr++ == c
+-              || (case_sensitive && isalpha(c) && isalpha(ptr[-1])
+-                  && toupper(c) == toupper(ptr[-1]))) {
++              || (case_sensitive && isalpha((unsigned char)c) && isalpha((unsigned char)ptr[-1])
++                  && toupper((unsigned char)c) == toupper((unsigned char)ptr[-1]))) {
+               if (++count == text->length)
+                   break;
+               c = *++str;
+@@ -904,8 +904,8 @@ Search(Widget w, register XawTextPositio
+       /*CONSTCOND*/
+       while (1) {
+           if (*ptr-- == c
+-              || (case_sensitive && isalpha(c) && isalpha(ptr[1])
+-                  && toupper(c) == toupper(ptr[1]))) {
++              || (case_sensitive && isalpha((unsigned char)c) && isalpha((unsigned char)ptr[1])
++                  && toupper((unsigned char)c) == toupper((unsigned char)ptr[1]))) {
+               if (++count == text->length)
+                   break;
+               c = *--str;
Index: pkgsrc/x11/libXaw/patches/patch-src_DisplayList.c
diff -u /dev/null pkgsrc/x11/libXaw/patches/patch-src_DisplayList.c:1.1
--- /dev/null   Mon Apr  4 12:42:19 2022
+++ pkgsrc/x11/libXaw/patches/patch-src_DisplayList.c   Mon Apr  4 12:42:19 2022
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_DisplayList.c,v 1.1 2022/04/04 12:42:19 riastradh Exp $
+
+Fix ctype(3) abuse.
+
+--- src/DisplayList.c.orig     2021-03-27 17:40:21.000000000 +0000
++++ src/DisplayList.c
+@@ -1941,7 +1941,7 @@ _Xaw_Xlib_ArgsInitProc(String proc_name,
+     case EXPOSURES:
+       if (*num_params == 1)
+       {
+-        if (isdigit(params[0][0]) || params[0][0] == '+' || params[0][0] == '-')
++        if (isdigit((unsigned char)params[0][0]) || params[0][0] == '+' || params[0][0] == '-')
+           retval = (void *)read_int((char *)params[0], NULL);
+         else if (XmuCompareISOLatin1(params[0], "true") == 0 ||
+           XmuCompareISOLatin1(params[0], "on") == 0)
Index: pkgsrc/x11/libXaw/patches/patch-src_Panner.c
diff -u /dev/null pkgsrc/x11/libXaw/patches/patch-src_Panner.c:1.1
--- /dev/null   Mon Apr  4 12:42:19 2022
+++ pkgsrc/x11/libXaw/patches/patch-src_Panner.c        Mon Apr  4 12:42:19 2022
@@ -0,0 +1,28 @@
+$NetBSD: patch-src_Panner.c,v 1.1 2022/04/04 12:42:19 riastradh Exp $
+
+--- src/Panner.c.orig  2021-03-27 17:40:21.000000000 +0000
++++ src/Panner.c
+@@ -575,7 +575,7 @@ parse_page_string(String s, int pagesize
+     /*
+      * syntax:    spaces [+-] number spaces [pc\0] spaces
+      */
+-    for (; isascii(*s) && isspace(*s); s++)   /* skip white space */
++    for (; isascii((unsigned char)*s) && isspace((unsigned char)*s); s++)     /* skip white space */
+       ;
+ 
+     if (*s == '+' || *s == '-')       {               /* deal with signs */
+@@ -590,12 +590,12 @@ parse_page_string(String s, int pagesize
+     }
+ 
+                                       /* skip over numbers */
+-    for (cp = s; isascii(*s) && (isdigit(*s) || *s == '.'); s++)
++    for (cp = s; isascii((unsigned char)*s) && (isdigit((unsigned char)*s) || *s == '.'); s++)
+       ;
+     val *= atof(cp);
+ 
+                                       /* skip blanks */
+-    for (; isascii(*s) && isspace(*s); s++)
++    for (; isascii((unsigned char)*s) && isspace((unsigned char)*s); s++)
+       ;
+ 
+     if (*s) {                         /* if units */
Index: pkgsrc/x11/libXaw/patches/patch-src_TextAction.c
diff -u /dev/null pkgsrc/x11/libXaw/patches/patch-src_TextAction.c:1.1
--- /dev/null   Mon Apr  4 12:42:19 2022
+++ pkgsrc/x11/libXaw/patches/patch-src_TextAction.c    Mon Apr  4 12:42:19 2022
@@ -0,0 +1,42 @@
+$NetBSD: patch-src_TextAction.c,v 1.1 2022/04/04 12:42:19 riastradh Exp $
+
+Fix ctype(3) abuse.
+
+--- src/TextAction.c.orig      2021-03-27 17:40:21.000000000 +0000
++++ src/TextAction.c
+@@ -2607,7 +2607,7 @@ InsertNewLineAndIndent(Widget w, XEvent 
+       strcpy(++ptr, line_to_ip);
+ 
+       length++;
+-      while (length && (isspace(*ptr) || (*ptr == XawTAB)))
++      while (length && (isspace((unsigned char)*ptr) || (*ptr == XawTAB)))
+           ptr++, length--;
+       *ptr = '\0';
+       text.length = (int)strlen(text.ptr);
+@@ -3393,7 +3393,7 @@ Numeric(Widget w, XEvent *event, String 
+       long mult = ctx->text.mult;
+ 
+       if (*num_params != 1 || strlen(params[0]) != 1
+-          || (!isdigit(params[0][0])
++          || (!isdigit((unsigned char)params[0][0])
+               && (params[0][0] != '-' || mult != 0))) {
+           char err_buf[256];
+ 
+@@ -3591,7 +3591,7 @@ StripOutOldCRs(TextWidget ctx, XawTextPo
+                   if (!iswspace(((wchar_t*)buf)[i]) || ((periodPos + i) >= to))
+                       break;
+               }
+-              else if (!isspace(buf[i]) || (periodPos + i) >= to)
++              else if (!isspace((unsigned char)buf[i]) || (periodPos + i) >= to)
+                   break;
+ 
+           XtFree(buf);
+@@ -3681,7 +3681,7 @@ InsertNewCRs(TextWidget ctx, XawTextPosi
+               if (!iswspace(((wchar_t*)buf)[i]))
+                   break;
+           }
+-          else if (!isspace(buf[i]))
++          else if (!isspace((unsigned char)buf[i]))
+               break;
+ 
+       to -= (i - 1);
Index: pkgsrc/x11/libXaw/patches/patch-src_TextSink.c
diff -u /dev/null pkgsrc/x11/libXaw/patches/patch-src_TextSink.c:1.1
--- /dev/null   Mon Apr  4 12:42:19 2022
+++ pkgsrc/x11/libXaw/patches/patch-src_TextSink.c      Mon Apr  4 12:42:19 2022
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_TextSink.c,v 1.1 2022/04/04 12:42:19 riastradh Exp $
+
+Fix ctype(3) abuse.
+
+--- src/TextSink.c.orig        2021-03-27 17:40:21.000000000 +0000
++++ src/TextSink.c
+@@ -1251,7 +1251,7 @@ _XawTextSinkAddProperty(XawTextPropertyL
+       weight = asterisk;
+     if (property->slant != NULLQUARK) {
+       slant = XrmQuarkToString(property->slant);
+-      if (toupper(*slant) != 'R')
++      if (toupper((unsigned char)*slant) != 'R')
+           slant = asterisk;   /* X defaults to italics, so, don't
+                                  care in resolving between `I' and `O' */
+     }
Index: pkgsrc/x11/libXaw/patches/patch-src_XawIm.c
diff -u /dev/null pkgsrc/x11/libXaw/patches/patch-src_XawIm.c:1.1
--- /dev/null   Mon Apr  4 12:42:19 2022
+++ pkgsrc/x11/libXaw/patches/patch-src_XawIm.c Mon Apr  4 12:42:19 2022
@@ -0,0 +1,40 @@
+$NetBSD: patch-src_XawIm.c,v 1.1 2022/04/04 12:42:19 riastradh Exp $
+
+Fix ctype(3) abuse.
+
+--- src/XawIm.c.orig   2021-03-27 17:40:21.000000000 +0000
++++ src/XawIm.c
+@@ -472,14 +472,14 @@ OpenIM(XawVendorShellExtPart *ve)
+ 
+       for(ns=s=ve->im.input_method; ns && *s;) {
+           /* skip any leading blanks */
+-          while (*s && isspace(*s)) s++;
++          while (*s && isspace((unsigned char)*s)) s++;
+           if (!*s) break;
+           if ((ns = end = strchr(s, ',')) == NULL)
+               end = s + strlen(s);
+           /* If there is a spurious comma end can be the same as s */
+           if (end > s) {
+               /* strip any trailing blanks */
+-              while (isspace(*(end - 1))) end--;
++              while (isspace((unsigned char)*(end - 1))) end--;
+ 
+               strcpy (pbuf, "@im=");
+               strncat (pbuf, s, (size_t)(end - s));
+@@ -514,14 +514,14 @@ OpenIM(XawVendorShellExtPart *ve)
+     }
+     found = False;
+     for(ns = s = ve->im.preedit_type; s && !found;) {
+-      while (*s && isspace(*s)) s++;
++      while (*s && isspace((unsigned char)*s)) s++;
+       if (!*s) break;
+       if ((ns = end = strchr(s, ',')) == NULL)
+           end = s + strlen(s);
+       else
+           ns++;
+       if (end > s)
+-          while (isspace(*(end - 1))) end--;
++          while (isspace((unsigned char)*(end - 1))) end--;
+ 
+       if (!strncmp(s, "OverTheSpot", (size_t)(end - s))) {
+           input_style = (XIMPreeditPosition | XIMStatusArea);



Home | Main Index | Thread Index | Old Index