Something went wrong. Try again.
What happens if I push all of nixpkgs
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556From 6745b6362681f57823a57575a7949bd510767ac4 Mon Sep 17 00:00:00 2001From: Mikael Voss <mvs@nyantec.com>Date: Wed, 23 Jul 2025 18:37:10 +0200Subject: [PATCH 1/2] Replace unsound use of EOFMIME-Version: 1.0Content-Type: text/plain; charset=UTF-8Content-Transfer-Encoding: 8bit
While getopt_long returns -1 on error, EOF is an implementation‐definednegative integer constant that just happens to be defined as -1 by mostC standard libraries.--- prctl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/prctl.c b/prctl.cindex 38cbcd1..527584c 100644--- a/prctl.c+++ b/prctl.c@@ -299,8 +299,8 @@ main(int argc, char **argv) exit(1); } opterr = 0;- while ((opt = getopt_long(argc, argv, "+qhv", longopts, - (int *) NULL)) != EOF) {+ while ((opt = getopt_long(argc, argv, "+qhv", longopts,+ (int *) NULL)) != -1) { switch (opt) { case 'u': if (strcmp(optarg, "silent") == 0) {
From 0c11b937c30e41e97c3fa852f6d65cd595bc193f Mon Sep 17 00:00:00 2001From: Mikael Voss <mvs@nyantec.com>Date: Wed, 23 Jul 2025 18:54:39 +0200Subject: [PATCH 2/2] Properly display invalid long options
--- prctl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/prctl.c b/prctl.cindex 527584c..4c1d632 100644--- a/prctl.c+++ b/prctl.c@@ -375,8 +375,8 @@ main(int argc, char **argv) break; case '?':- fprintf(stderr, "%s: invalid option - %c\n", - progname, optopt);+ fprintf(stderr, "%s: invalid option: %s\n",+ progname, argv[optind - 1]); exit(1); break; }