pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/devel/libuuid devel/libuuid: Patch ctype(3) abuse.
details: https://anonhg.NetBSD.org/pkgsrc/rev/39ffe7f474b5
branches: trunk
changeset: 376139:39ffe7f474b5
user: riastradh <riastradh%pkgsrc.org@localhost>
date: Sat Apr 02 21:00:54 2022 +0000
description:
devel/libuuid: Patch ctype(3) abuse.
diffstat:
devel/libuuid/Makefile | 3 ++-
devel/libuuid/distinfo | 10 +++++++++-
devel/libuuid/patches/patch-include_strutils.h | 23 +++++++++++++++++++++++
devel/libuuid/patches/patch-lib_canonicalize.c | 15 +++++++++++++++
devel/libuuid/patches/patch-lib_colors.c | 24 ++++++++++++++++++++++++
devel/libuuid/patches/patch-lib_mangle.c | 20 ++++++++++++++++++++
devel/libuuid/patches/patch-lib_signames.c | 15 +++++++++++++++
devel/libuuid/patches/patch-lib_sysfs.c | 18 ++++++++++++++++++
devel/libuuid/patches/patch-lib_ttyutils.c | 15 +++++++++++++++
devel/libuuid/patches/patch-libuuid_src_parse.c | 15 +++++++++++++++
10 files changed, 156 insertions(+), 2 deletions(-)
diffs (222 lines):
diff -r d142c6d9787d -r 39ffe7f474b5 devel/libuuid/Makefile
--- a/devel/libuuid/Makefile Sat Apr 02 19:31:45 2022 +0000
+++ b/devel/libuuid/Makefile Sat Apr 02 21:00:54 2022 +0000
@@ -1,8 +1,9 @@
-# $NetBSD: Makefile,v 1.23 2017/12/12 20:56:09 maya Exp $
+# $NetBSD: Makefile,v 1.24 2022/04/02 21:00:54 riastradh Exp $
.include "Makefile.common"
PKGNAME= ${DISTNAME:S/util-linux/libuuid/}
+PKGREVISION= 1
CATEGORIES= devel
COMMENT= Generate unique identifiers for objects
LICENSE= modified-bsd
diff -r d142c6d9787d -r 39ffe7f474b5 devel/libuuid/distinfo
--- a/devel/libuuid/distinfo Sat Apr 02 19:31:45 2022 +0000
+++ b/devel/libuuid/distinfo Sat Apr 02 21:00:54 2022 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.25 2021/10/26 10:15:30 nia Exp $
+$NetBSD: distinfo,v 1.26 2022/04/02 21:00:54 riastradh Exp $
BLAKE2s (util-linux-2.32.1.tar.xz) = 396ab70d86492b47f63c0e2b2447d5a95169046b8f37ac0f9480166c09167847
SHA512 (util-linux-2.32.1.tar.xz) = 267fedae24a874ee4dc558081f6b8d07b33b955b0635f3348f021c111c17f2e95c01b2cbf909fe13c6ca448cbcf23c658c75f72f25749aa65e99f68fabb94698
@@ -8,13 +8,21 @@
SHA1 (patch-configure) = 400904ae2e58b717e990ba26c111b90bc8f240d1
SHA1 (patch-include_c.h) = 4596369e4b742329be513952c66d1fa3705de017
SHA1 (patch-include_randutils.h) = d28ade8554d218f2af4a815a611b833b2036a5eb
+SHA1 (patch-include_strutils.h) = abb960a2ce6fe9f22ef178aea4db17aac5e0df70
SHA1 (patch-include_ttyutils.h) = fa2b253d568e5aface99727c397d3c4c892b2c93
+SHA1 (patch-lib_canonicalize.c) = 8e05ead75f6cef89e02b4915f6128a1ebd97bcc0
+SHA1 (patch-lib_colors.c) = a7f6c7700bcf1352037253486d16657dfa2804d3
SHA1 (patch-lib_ismounted.c) = 11f5148020dba2a22e1fbe4882fe423dfb11ad73
+SHA1 (patch-lib_mangle.c) = b0acd6dbb28e429ca55d33cdccfb71a525d86b5d
SHA1 (patch-lib_pager.c) = 3d4b65f9ccb6437bcc0777634660b5ae3150d14e
SHA1 (patch-lib_randutils.c) = aece9cb8ec033966d535955654cc27263b3c4976
+SHA1 (patch-lib_signames.c) = ed5939c887c90bd5c9eeb6df047e5d7d22cb34f3
+SHA1 (patch-lib_sysfs.c) = a55660f82b6f88938eae0cd185d9db048a73d4ed
+SHA1 (patch-lib_ttyutils.c) = 093fe0d8755366e5e5ede3f3b4df193918c424db
SHA1 (patch-libblkid_docs_Makefile.in) = 97a1559dad77e32d78bd504d8d3523b9cc403c36
SHA1 (patch-libfdisk_docs_Makefile.in) = def97b85e8760cd18af736ab331e2f476f0c9c67
SHA1 (patch-libmount_docs_Makefile.in) = a55063e89161221cecda661039d0a62174592669
SHA1 (patch-libsmartcols_docs_Makefile.in) = aa44d1a9ffd9bf4422ed8892d91b4e0e72e50407
SHA1 (patch-libuuid_src_gen__uuid.c) = 94d190ffca4357e62c6b0ae90fdc9a7456e10468
+SHA1 (patch-libuuid_src_parse.c) = 39396e6d96d0402ce8b0cf739641a73a467a4dd2
SHA1 (patch-misc-utils_mcookie.c) = 1456f47881552162b1ba6218c620f23648eceb6c
diff -r d142c6d9787d -r 39ffe7f474b5 devel/libuuid/patches/patch-include_strutils.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/libuuid/patches/patch-include_strutils.h Sat Apr 02 21:00:54 2022 +0000
@@ -0,0 +1,23 @@
+$NetBSD: patch-include_strutils.h,v 1.3 2022/04/02 21:00:54 riastradh Exp $
+
+Fix ctype(3) abuse.
+
+--- include/strutils.h.orig 2018-06-04 07:57:02.792445890 +0000
++++ include/strutils.h
+@@ -162,14 +162,14 @@ static inline const char *endswith(const
+ */
+ static inline const char *skip_space(const char *p)
+ {
+- while (isspace(*p))
++ while (isspace((unsigned char)*p))
+ ++p;
+ return p;
+ }
+
+ static inline const char *skip_blank(const char *p)
+ {
+- while (isblank(*p))
++ while (isblank((unsigned char)*p))
+ ++p;
+ return p;
+ }
diff -r d142c6d9787d -r 39ffe7f474b5 devel/libuuid/patches/patch-lib_canonicalize.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/libuuid/patches/patch-lib_canonicalize.c Sat Apr 02 21:00:54 2022 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-lib_canonicalize.c,v 1.1 2022/04/02 21:00:54 riastradh Exp $
+
+Fix ctype(3) abuse.
+
+--- lib/canonicalize.c.orig 2018-07-11 13:34:54.227003733 +0000
++++ lib/canonicalize.c
+@@ -57,7 +57,7 @@ static int is_dm_devname(char *canonical
+
+ if (!p
+ || strncmp(p, "/dm-", 4) != 0
+- || !isdigit(*(p + 4))
++ || !isdigit((unsigned char)*(p + 4))
+ || stat(canonical, &sb) != 0
+ || !S_ISBLK(sb.st_mode))
+ return 0;
diff -r d142c6d9787d -r 39ffe7f474b5 devel/libuuid/patches/patch-lib_colors.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/libuuid/patches/patch-lib_colors.c Sat Apr 02 21:00:54 2022 +0000
@@ -0,0 +1,24 @@
+$NetBSD: patch-lib_colors.c,v 1.1 2022/04/02 21:00:54 riastradh Exp $
+
+Fix ctype(3) abuse.
+
+--- lib/colors.c.orig 2018-06-04 07:57:02.792445890 +0000
++++ lib/colors.c
+@@ -363,7 +363,7 @@ static int cn_sequence(const char *str,
+ *seq = NULL;
+
+ /* convert logical names like "red" to the real sequence */
+- if (*str != '\\' && isalpha(*str)) {
++ if (*str != '\\' && isalpha((unsigned char)*str)) {
+ const char *s = color_sequence_from_colorname(str);
+ *seq = strdup(s ? s : str);
+
+@@ -456,7 +456,7 @@ static int colors_add_scheme(struct ul_c
+ rc = -ENOMEM;
+
+ /* convert logical name (e.g. "red") to real ESC code */
+- if (isalpha(*seq)) {
++ if (isalpha((unsigned char)*seq)) {
+ const char *s = color_sequence_from_colorname(seq);
+ char *p;
+
diff -r d142c6d9787d -r 39ffe7f474b5 devel/libuuid/patches/patch-lib_mangle.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/libuuid/patches/patch-lib_mangle.c Sat Apr 02 21:00:54 2022 +0000
@@ -0,0 +1,20 @@
+$NetBSD: patch-lib_mangle.c,v 1.1 2022/04/02 21:00:54 riastradh Exp $
+
+Fix ctype(3) abuse.
+
+--- lib/mangle.c.orig 2018-06-04 07:57:02.793445882 +0000
++++ lib/mangle.c
+@@ -80,9 +80,11 @@ size_t unhexmangle_to_buffer(const char
+
+ while(*s && sz < len - 1) {
+ if (*s == '\\' && sz + 3 < len - 1 && s[1] == 'x' &&
+- isxdigit(s[2]) && isxdigit(s[3])) {
++ isxdigit((unsigned char)s[2]) &&
++ isxdigit((unsigned char)s[3])) {
+
+- *buf++ = from_hex(s[2]) << 4 | from_hex(s[3]);
++ *buf++ = from_hex((unsigned char)s[2]) << 4 |
++ from_hex((unsigned char)s[3]);
+ s += 4;
+ sz += 4;
+ } else {
diff -r d142c6d9787d -r 39ffe7f474b5 devel/libuuid/patches/patch-lib_signames.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/libuuid/patches/patch-lib_signames.c Sat Apr 02 21:00:54 2022 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-lib_signames.c,v 1.1 2022/04/02 21:00:54 riastradh Exp $
+
+Fix ctype(3) abuse.
+
+--- lib/signames.c.orig 2018-06-04 07:57:02.794445874 +0000
++++ lib/signames.c
+@@ -144,7 +144,7 @@ static int rtsig_to_signum(const char *s
+ sig += 4;
+ maxi = 1;
+ }
+- if (!isdigit(*sig))
++ if (!isdigit((unsigned char)*sig))
+ return -1;
+ errno = 0;
+ num = strtol(sig, &ep, 10);
diff -r d142c6d9787d -r 39ffe7f474b5 devel/libuuid/patches/patch-lib_sysfs.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/libuuid/patches/patch-lib_sysfs.c Sat Apr 02 21:00:54 2022 +0000
@@ -0,0 +1,18 @@
+$NetBSD: patch-lib_sysfs.c,v 1.1 2022/04/02 21:00:54 riastradh Exp $
+
+Fix ctype(3) abuse.
+
+--- lib/sysfs.c.orig 2018-07-11 13:34:54.228003727 +0000
++++ lib/sysfs.c
+@@ -346,8 +346,9 @@ int sysfs_is_partition_dirent(DIR *dir,
+ * "<parent>[:digit:]" or "<parent>p[:digit:]"
+ */
+ return strncmp(p, d->d_name, len) == 0 &&
+- ((*(d->d_name + len) == 'p' && isdigit(*(d->d_name + len + 1)))
+- || isdigit(*(d->d_name + len)));
++ ((*(d->d_name + len) == 'p' &&
++ isdigit((unsigned char)*(d->d_name + len + 1)))
++ || isdigit((unsigned char)*(d->d_name + len)));
+ }
+
+ /* Cannot use /partition file, not supported on old sysfs */
diff -r d142c6d9787d -r 39ffe7f474b5 devel/libuuid/patches/patch-lib_ttyutils.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/libuuid/patches/patch-lib_ttyutils.c Sat Apr 02 21:00:54 2022 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-lib_ttyutils.c,v 1.1 2022/04/02 21:00:54 riastradh Exp $
+
+Fix ctype(3) abuse.
+
+--- lib/ttyutils.c.orig 2018-07-11 13:34:54.228003727 +0000
++++ lib/ttyutils.c
+@@ -104,7 +104,7 @@ int get_terminal_name(const char **path,
+ *name = tty;
+ if (number) {
+ for (p = tty; p && *p; p++) {
+- if (isdigit(*p)) {
++ if (isdigit((unsigned char)*p)) {
+ *number = p;
+ break;
+ }
diff -r d142c6d9787d -r 39ffe7f474b5 devel/libuuid/patches/patch-libuuid_src_parse.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/libuuid/patches/patch-libuuid_src_parse.c Sat Apr 02 21:00:54 2022 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-libuuid_src_parse.c,v 1.1 2022/04/02 21:00:54 riastradh Exp $
+
+Fix ctype(3) abuse.
+
+--- libuuid/src/parse.c.orig 2017-09-18 09:48:03.575891419 +0000
++++ libuuid/src/parse.c
+@@ -59,7 +59,7 @@ int uuid_parse(const char *in, uuid_t uu
+ if (i== 36)
+ if (*cp == 0)
+ continue;
+- if (!isxdigit(*cp))
++ if (!isxdigit((unsigned char)*cp))
+ return -1;
+ }
+ uuid.time_low = strtoul(in, NULL, 16);
Home |
Main Index |
Thread Index |
Old Index