Received: by mail.netbsd.org (Postfix, from userid 605) id 7E2BC84F00; Sat, 13 Jan 2024 04:16:26 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id ADEE584D31 for ; Sat, 13 Jan 2024 04:16:25 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([IPv6:::1]) by localhost (mail.netbsd.org [IPv6:::1]) (amavisd-new, port 10025) with ESMTP id hywGTefCk3oo for ; Sat, 13 Jan 2024 04:16:24 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.netbsd.org [199.233.217.197]) by mail.netbsd.org (Postfix) with ESMTP id D896A84CF4 for ; Sat, 13 Jan 2024 04:16:24 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id CF6D5FA42; Sat, 13 Jan 2024 04:16:24 +0000 (UTC) Content-Transfer-Encoding: 7bit Content-Type: multipart/mixed; boundary="_----------=_1705119384272060" MIME-Version: 1.0 Date: Sat, 13 Jan 2024 04:16:24 +0000 From: "Taylor R Campbell" Subject: CVS commit: pkgsrc/security/libgpg-error To: pkgsrc-changes@NetBSD.org Reply-To: riastradh@netbsd.org X-Mailer: log_accum Message-Id: <20240113041624.CF6D5FA42@cvs.NetBSD.org> Sender: pkgsrc-changes-owner@NetBSD.org List-Id: Precedence: bulk List-Unsubscribe: This is a multi-part message in MIME format. --_----------=_1705119384272060 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Module Name: pkgsrc Committed By: riastradh Date: Sat Jan 13 04:16:24 UTC 2024 Modified Files: pkgsrc/security/libgpg-error: Makefile distinfo Added Files: pkgsrc/security/libgpg-error/patches: patch-doc_yat2m.c patch-src_argparse.c Log Message: security/libgpg-error: Patch away ctype(3) abuse. To generate a diff of this commit: cvs rdiff -u -r1.86 -r1.87 pkgsrc/security/libgpg-error/Makefile cvs rdiff -u -r1.59 -r1.60 pkgsrc/security/libgpg-error/distinfo cvs rdiff -u -r0 -r1.1 pkgsrc/security/libgpg-error/patches/patch-doc_yat2m.c \ pkgsrc/security/libgpg-error/patches/patch-src_argparse.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. --_----------=_1705119384272060 Content-Disposition: inline Content-Length: 6311 Content-Transfer-Encoding: binary Content-Type: text/x-diff; charset=us-ascii Modified files: Index: pkgsrc/security/libgpg-error/Makefile diff -u pkgsrc/security/libgpg-error/Makefile:1.86 pkgsrc/security/libgpg-error/Makefile:1.87 --- pkgsrc/security/libgpg-error/Makefile:1.86 Fri Apr 7 09:14:48 2023 +++ pkgsrc/security/libgpg-error/Makefile Sat Jan 13 04:16:24 2024 @@ -1,6 +1,7 @@ -# $NetBSD: Makefile,v 1.86 2023/04/07 09:14:48 adam Exp $ +# $NetBSD: Makefile,v 1.87 2024/01/13 04:16:24 riastradh Exp $ DISTNAME= libgpg-error-1.47 +PKGREVISION= 1 CATEGORIES= security MASTER_SITES= https://www.gnupg.org/ftp/gcrypt/libgpg-error/ MASTER_SITES+= ftp://ftp.gnupg.org/gcrypt/libgpg-error/ Index: pkgsrc/security/libgpg-error/distinfo diff -u pkgsrc/security/libgpg-error/distinfo:1.59 pkgsrc/security/libgpg-error/distinfo:1.60 --- pkgsrc/security/libgpg-error/distinfo:1.59 Thu Jun 15 23:41:31 2023 +++ pkgsrc/security/libgpg-error/distinfo Sat Jan 13 04:16:24 2024 @@ -1,7 +1,9 @@ -$NetBSD: distinfo,v 1.59 2023/06/15 23:41:31 riastradh Exp $ +$NetBSD: distinfo,v 1.60 2024/01/13 04:16:24 riastradh Exp $ BLAKE2s (libgpg-error-1.47.tar.bz2) = 91e8ad1fa6a7f42b68a9dca5b285c90bf9f3def9bdae1c23767c9bc29e5658fd SHA512 (libgpg-error-1.47.tar.bz2) = bbb4b15dae75856ee5b1253568674b56ad155524ae29a075cb5b0a7e74c4af685131775c3ea2226fff2f84ef80855e77aa661645d002b490a795c7ae57b66a30 Size (libgpg-error-1.47.tar.bz2) = 1020862 bytes +SHA1 (patch-doc_yat2m.c) = c5c497f6bcd110ca8dbd050cb74f3f537f6404a8 +SHA1 (patch-src_argparse.c) = 3e753aac4bce4273887bbb4818ae68a4016fb6d8 SHA1 (patch-src_estream.c) = 0502a55403062abeab22c83a6d919c57ff1c5d82 SHA1 (patch-src_syscfg_lock-obj-pub.netbsd.h) = 6f00890bc3d821da9b715c00a8f068fa4964df9e Added files: Index: pkgsrc/security/libgpg-error/patches/patch-doc_yat2m.c diff -u /dev/null pkgsrc/security/libgpg-error/patches/patch-doc_yat2m.c:1.1 --- /dev/null Sat Jan 13 04:16:24 2024 +++ pkgsrc/security/libgpg-error/patches/patch-doc_yat2m.c Sat Jan 13 04:16:24 2024 @@ -0,0 +1,24 @@ +$NetBSD: patch-doc_yat2m.c,v 1.1 2024/01/13 04:16:24 riastradh Exp $ + +Avoid ctype(3) abuse. + +--- doc/yat2m.c.orig 2022-10-07 08:20:16.000000000 +0000 ++++ doc/yat2m.c +@@ -374,7 +374,7 @@ ascii_strupr (char *string) + + for (p = string; *p; p++) + if (!(*p & 0x80)) +- *p = toupper (*p); ++ *p = toupper ((unsigned char)*p); + return string; + } + +@@ -500,7 +500,7 @@ macro_set_p (const char *name) + break; + if (!m || !m->value || !*m->value) + return 0; +- if ((*m->value & 0x80) || !isdigit (*m->value)) ++ if ((*m->value & 0x80) || !isdigit ((unsigned char)*m->value)) + return 1; /* Not a digit but some other string. */ + return !!atoi (m->value); + } Index: pkgsrc/security/libgpg-error/patches/patch-src_argparse.c diff -u /dev/null pkgsrc/security/libgpg-error/patches/patch-src_argparse.c:1.1 --- /dev/null Sat Jan 13 04:16:24 2024 +++ pkgsrc/security/libgpg-error/patches/patch-src_argparse.c Sat Jan 13 04:16:24 2024 @@ -0,0 +1,96 @@ +$NetBSD: patch-src_argparse.c,v 1.1 2024/01/13 04:16:24 riastradh Exp $ + +Fix ctype(3) abuse. + +--- src/argparse.c.orig 2023-01-17 08:46:53.000000000 +0000 ++++ src/argparse.c +@@ -826,8 +826,8 @@ substitute_vars (gpgrt_argparse_t *arg, + } + else + { +- for (pend = p+1; (*pend && isascii (*p) +- && (isalnum (*pend) || *pend == '_')); pend++) ++ for (pend = p+1; (*pend && isascii ((unsigned char)*p) ++ && (isalnum ((unsigned char)*pend) || *pend == '_')); pend++) + ; + } + +@@ -1050,20 +1050,20 @@ handle_meta_if (gpgrt_argparse_t *arg, u + return 0; + } + +- for (p = str1; *p && !(isascii (*p) && isspace (*p)); p++) ++ for (p = str1; *p && !(isascii ((unsigned char)*p) && isspace ((unsigned char)*p)); p++) + ; + if (*p) + { + *p++ = 0; +- for (; *p && isascii (*p) && isspace (*p); p++) ++ for (; *p && isascii ((unsigned char)*p) && isspace ((unsigned char)*p); p++) + ; + op = p; +- for (; *p && !(isascii (*p) && isspace (*p)); p++) ++ for (; *p && !(isascii ((unsigned char)*p) && isspace ((unsigned char)*p)); p++) + ; + if (*p) + { + *p++ = 0; +- for (; *p && isascii (*p) && isspace (*p); p++) ++ for (; *p && isascii ((unsigned char)*p) && isspace ((unsigned char)*p); p++) + ; + if (*p) + str2 = p; +@@ -1207,7 +1207,7 @@ handle_meta_let (gpgrt_argparse_t *arg, + int rc; + variable_t v; + +- for (value = name; *value && !(isascii (*value) && isspace (*value)); value++) ++ for (value = name; *value && !(isascii ((unsigned char)*value) && isspace ((unsigned char)*value)); value++) + ; + if (*value) + { +@@ -1215,7 +1215,7 @@ handle_meta_let (gpgrt_argparse_t *arg, + trim_spaces (value); + } + +- if (!isascii (*name) || !isalpha (*name)) ++ if (!isascii ((unsigned char)*name) || !isalpha ((unsigned char)*name)) + return 0; /* Ignore setting a system or invalid variable. */ + + if (alternate) +@@ -1259,7 +1259,7 @@ handle_meta_getenv (gpgrt_argparse_t *ar + #endif + + for (varname = name; +- *varname && !(isascii (*varname) && isspace (*varname)); ++ *varname && !(isascii ((unsigned char)*varname) && isspace ((unsigned char)*varname)); + varname++) + ; + if (*varname) +@@ -1268,7 +1268,7 @@ handle_meta_getenv (gpgrt_argparse_t *ar + trim_spaces (varname); + } + +- if (!isascii (*name) || !isalpha (*name)) ++ if (!isascii ((unsigned char)*name) || !isalpha ((unsigned char)*name)) + return 0; /* Ignore setting a system or invalid variable. */ + + if (!*varname) +@@ -1430,7 +1430,7 @@ handle_metacmd (gpgrt_argparse_t *arg, c + char *rest; + int i; + +- for (rest = keyword; *rest && !(isascii (*rest) && isspace (*rest)); rest++) ++ for (rest = keyword; *rest && !(isascii ((unsigned char)*rest) && isspace ((unsigned char)*rest)); rest++) + ; + if (*rest) + { +@@ -2867,7 +2867,7 @@ set_opt_arg (gpgrt_argparse_t *arg, unsi + return 0; + + case ARGPARSE_TYPE_ULONG: +- while (isascii (*s) && isspace(*s)) ++ while (isascii ((unsigned char)*s) && isspace((unsigned char)*s)) + s++; + if (*s == '-') + { --_----------=_1705119384272060--