diff options
author | riastradh <riastradh@pkgsrc.org> | 2022-04-03 10:29:41 +0000 |
---|---|---|
committer | riastradh <riastradh@pkgsrc.org> | 2022-04-03 10:29:41 +0000 |
commit | 4cc14a8925823d668b3307eb7086a3b8fe8f7857 (patch) | |
tree | 709f095cda0c97671966c3b652e46524ebe18f44 /net | |
parent | 9bdc7547065d237afbd93ce3d282366f1aa0637e (diff) | |
download | pkgsrc-4cc14a8925823d668b3307eb7086a3b8fe8f7857.tar.gz |
net/socat: Patch ctype(3) abuse.
Diffstat (limited to 'net')
-rw-r--r-- | net/socat/Makefile | 3 | ||||
-rw-r--r-- | net/socat/distinfo | 5 | ||||
-rw-r--r-- | net/socat/patches/patch-sysutils.c | 33 | ||||
-rw-r--r-- | net/socat/patches/patch-xio-openssl.c | 15 | ||||
-rw-r--r-- | net/socat/patches/patch-xio-socket.c | 15 |
5 files changed, 69 insertions, 2 deletions
diff --git a/net/socat/Makefile b/net/socat/Makefile index e078b3bfac7..9be25f29a93 100644 --- a/net/socat/Makefile +++ b/net/socat/Makefile @@ -1,6 +1,7 @@ -# $NetBSD: Makefile,v 1.46 2021/01/10 22:07:28 otis Exp $ +# $NetBSD: Makefile,v 1.47 2022/04/03 10:29:41 riastradh Exp $ DISTNAME= socat-1.7.4.1 +PKGREVISION= 1 CATEGORIES= net MASTER_SITES= http://www.dest-unreach.org/socat/download/ diff --git a/net/socat/distinfo b/net/socat/distinfo index bca4ca77348..415560aa75b 100644 --- a/net/socat/distinfo +++ b/net/socat/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.33 2021/10/26 11:06:57 nia Exp $ +$NetBSD: distinfo,v 1.34 2022/04/03 10:29:41 riastradh Exp $ BLAKE2s (socat-1.7.4.1.tar.gz) = 40fc322f89ca333a35c77cb25d71512404bfd116d36aecedb1773201f37b5d2e SHA512 (socat-1.7.4.1.tar.gz) = e43c8b23a841aea5ecc3ac324185ee4ada552a8284ec41b99245def2d8b493bca9caea1af6f646f434a7eda67a1dd71e4e037eea65fce0444840236eadb126a6 @@ -7,3 +7,6 @@ SHA1 (patch-config.h.in) = e0cb8c4075ca96863e458f1c2384dc7a6b69e928 SHA1 (patch-configure) = ba75b5f192c1359220bea019fa50603b2b5c7c3a SHA1 (patch-fdname.c) = c59bd921989e4d84375764fdd707b7cd6c49ceba SHA1 (patch-sysincludes.h) = d48307ade6bc82bea946920e7336bc5329714c08 +SHA1 (patch-sysutils.c) = 03ae8b81f0277d8dbbdf82e5b215d7099b25cc36 +SHA1 (patch-xio-openssl.c) = 26745eff5eab745ac45eb04b2243b0bc4bfd6b8d +SHA1 (patch-xio-socket.c) = f36e6ccc3a659ec9d6d7ce4e470d8b874fe8f6ff diff --git a/net/socat/patches/patch-sysutils.c b/net/socat/patches/patch-sysutils.c new file mode 100644 index 00000000000..f9d2a2c5c2e --- /dev/null +++ b/net/socat/patches/patch-sysutils.c @@ -0,0 +1,33 @@ +$NetBSD: patch-sysutils.c,v 1.1 2022/04/03 10:29:41 riastradh Exp $ + +Fix ctype(3) abuse. + +--- sysutils.c.orig 2021-01-03 18:23:22.000000000 +0000 ++++ sysutils.c +@@ -745,7 +745,7 @@ int xiosetenv(const char *varname, const + progname = diag_get_string('p'); + envname[0] = '\0'; strncat(envname, progname, XIO_ENVNAMELEN-1); + l = strlen(envname); +- for (i = 0; i < l; ++i) envname[i] = toupper(envname[i]); ++ for (i = 0; i < l; ++i) envname[i] = toupper((unsigned char)envname[i]); + strncat(envname+l, "_", XIO_ENVNAMELEN-l-1); + l += 1; + strncat(envname+l, varname, XIO_ENVNAMELEN-l-1); +@@ -771,7 +771,7 @@ int xiosetenv2(const char *varname, cons + l += 1; + strncat(envname+l, varname2, XIO_ENVNAMELEN-l-1); + l += strlen(envname+l); +- for (i = 0; i < l; ++i) envname[i] = toupper(envname[i]); ++ for (i = 0; i < l; ++i) envname[i] = toupper((unsigned char)envname[i]); + return _xiosetenv(envname, value, overwrite, sep); + # undef XIO_ENVNAMELEN + } +@@ -799,7 +799,7 @@ int xiosetenv3(const char *varname, cons + l += 1; + strncat(envname+l, varname3, XIO_ENVNAMELEN-l-1); + l += strlen(envname+l); +- for (i = 0; i < l; ++i) envname[i] = toupper(envname[i]); ++ for (i = 0; i < l; ++i) envname[i] = toupper((unsigned char)envname[i]); + return _xiosetenv(envname, value, overwrite, sep); + # undef XIO_ENVNAMELEN + } diff --git a/net/socat/patches/patch-xio-openssl.c b/net/socat/patches/patch-xio-openssl.c new file mode 100644 index 00000000000..9c7992c6dc7 --- /dev/null +++ b/net/socat/patches/patch-xio-openssl.c @@ -0,0 +1,15 @@ +$NetBSD: patch-xio-openssl.c,v 1.1 2022/04/03 10:29:41 riastradh Exp $ + +Fix ctype(3) abuse. + +--- xio-openssl.c.orig 2021-01-03 18:23:22.000000000 +0000 ++++ xio-openssl.c +@@ -1505,7 +1505,7 @@ static int openssl_delete_cert_info(void + progname = diag_get_string('p'); + envprefix[0] = '\0'; strncat(envprefix, progname, XIO_ENVNAMELEN-1); + l = strlen(envprefix); +- for (i = 0; i < l; ++i) envprefix[i] = toupper(envprefix[i]); ++ for (i = 0; i < l; ++i) envprefix[i] = toupper((unsigned char)envprefix[i]); + strncat(envprefix+l, "_OPENSSL_", XIO_ENVNAMELEN-l-1); + + #if HAVE_VAR_ENVIRON diff --git a/net/socat/patches/patch-xio-socket.c b/net/socat/patches/patch-xio-socket.c new file mode 100644 index 00000000000..c28098f571a --- /dev/null +++ b/net/socat/patches/patch-xio-socket.c @@ -0,0 +1,15 @@ +$NetBSD: patch-xio-socket.c,v 1.1 2022/04/03 10:29:41 riastradh Exp $ + +Fix ctype(3) abuse. + +--- xio-socket.c.orig 2021-01-03 18:23:22.000000000 +0000 ++++ xio-socket.c +@@ -1595,7 +1595,7 @@ int retropt_socket_pf(struct opt *opts, + char *pfname; + + if (retropt_string(opts, OPT_PROTOCOL_FAMILY, &pfname) >= 0) { +- if (isdigit(pfname[0])) { ++ if (isdigit((unsigned char)pfname[0])) { + *pf = strtoul(pfname, NULL /*!*/, 0); + #if WITH_IP4 + } else if (!strcasecmp("inet", pfname) || |