pkgsrc-Changes archive

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

CVS commit: pkgsrc/devel/jq



Module Name:    pkgsrc
Committed By:   riastradh
Date:           Thu Jul 11 19:59:08 UTC 2024

Modified Files:
        pkgsrc/devel/jq: Makefile distinfo
Added Files:
        pkgsrc/devel/jq/patches: patch-src_builtin.c patch-src_main.c

Log Message:
devel/jq: Fix ctype(3) abuse.

https://github.com/jqlang/jq/issues/3151
https://github.com/jqlang/jq/pull/3152


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 pkgsrc/devel/jq/Makefile
cvs rdiff -u -r1.17 -r1.18 pkgsrc/devel/jq/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/devel/jq/patches/patch-src_builtin.c \
    pkgsrc/devel/jq/patches/patch-src_main.c

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

Modified files:

Index: pkgsrc/devel/jq/Makefile
diff -u pkgsrc/devel/jq/Makefile:1.20 pkgsrc/devel/jq/Makefile:1.21
--- pkgsrc/devel/jq/Makefile:1.20       Thu Dec 14 08:08:03 2023
+++ pkgsrc/devel/jq/Makefile    Thu Jul 11 19:59:07 2024
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.20 2023/12/14 08:08:03 adam Exp $
+# $NetBSD: Makefile,v 1.21 2024/07/11 19:59:07 riastradh Exp $
 
 DISTNAME=      jq-1.7.1
+PKGREVISION=   1
 CATEGORIES=    devel
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=jqlang/}
 GITHUB_RELEASE=        ${DISTNAME}

Index: pkgsrc/devel/jq/distinfo
diff -u pkgsrc/devel/jq/distinfo:1.17 pkgsrc/devel/jq/distinfo:1.18
--- pkgsrc/devel/jq/distinfo:1.17       Thu Dec 14 08:08:03 2023
+++ pkgsrc/devel/jq/distinfo    Thu Jul 11 19:59:07 2024
@@ -1,6 +1,8 @@
-$NetBSD: distinfo,v 1.17 2023/12/14 08:08:03 adam Exp $
+$NetBSD: distinfo,v 1.18 2024/07/11 19:59:07 riastradh Exp $
 
 BLAKE2s (jq-1.7.1.tar.gz) = ff4a9505b42b62ef0efd45fab9fd2b4b560596f9779f41f93e6893b67fb20435
 SHA512 (jq-1.7.1.tar.gz) = 464861fb2e0d6934b616f1dc7f8002d7dae727c8c0c07b385b813e7522ba1ada8ead4165e1d99c892e3ea76e238c55a15b718c738805419721920f88f8d8478c
 Size (jq-1.7.1.tar.gz) = 1950645 bytes
 SHA1 (patch-Makefile.in) = 657b308e7276a687ffdcdf86b0b70bd805dd9947
+SHA1 (patch-src_builtin.c) = ea034595e15817cbf978ee3da5014d98aea6bfb0
+SHA1 (patch-src_main.c) = d4b671e62853dd8a072f14851892e48a127ea599

Added files:

Index: pkgsrc/devel/jq/patches/patch-src_builtin.c
diff -u /dev/null pkgsrc/devel/jq/patches/patch-src_builtin.c:1.1
--- /dev/null   Thu Jul 11 19:59:08 2024
+++ pkgsrc/devel/jq/patches/patch-src_builtin.c Thu Jul 11 19:59:08 2024
@@ -0,0 +1,17 @@
+$NetBSD: patch-src_builtin.c,v 1.1 2024/07/11 19:59:08 riastradh Exp $
+
+Fix ctype(3) abuse.
+https://github.com/jqlang/jq/issues/3151
+https://github.com/jqlang/jq/pull/3152
+
+--- src/builtin.c.orig 2023-12-13 19:24:02.000000000 +0000
++++ src/builtin.c
+@@ -1440,7 +1440,7 @@ static jv f_strptime(jq_state *jq, jv a,
+   }
+ #endif
+   const char *end = strptime(input, fmt, &tm);
+-  if (end == NULL || (*end != '\0' && !isspace(*end))) {
++  if (end == NULL || (*end != '\0' && !isspace((unsigned char)*end))) {
+     return ret_error2(a, b, jv_string_fmt("date \"%s\" does not match format \"%s\"", input, fmt));
+   }
+   jv_free(b);
Index: pkgsrc/devel/jq/patches/patch-src_main.c
diff -u /dev/null pkgsrc/devel/jq/patches/patch-src_main.c:1.1
--- /dev/null   Thu Jul 11 19:59:08 2024
+++ pkgsrc/devel/jq/patches/patch-src_main.c    Thu Jul 11 19:59:08 2024
@@ -0,0 +1,17 @@
+$NetBSD: patch-src_main.c,v 1.1 2024/07/11 19:59:08 riastradh Exp $
+
+Fix ctype(3) abuse.
+https://github.com/jqlang/jq/issues/3151
+https://github.com/jqlang/jq/pull/3152
+
+--- src/main.c.orig    2023-12-13 19:24:02.000000000 +0000
++++ src/main.c
+@@ -126,7 +126,7 @@ static void die() {
+ }
+ 
+ static int isoptish(const char* text) {
+-  return text[0] == '-' && (text[1] == '-' || isalpha(text[1]));
++  return text[0] == '-' && (text[1] == '-' || isalpha((unsigned char)text[1]));
+ }
+ 
+ static int isoption(const char* text, char shortopt, const char* longopt, size_t *short_opts) {



Home | Main Index | Thread Index | Old Index