>From 700db8148126afef1331b4109377c6c8be07b43b Mon Sep 17 00:00:00 2001 From: Szabolcs Nagy Date: Sun, 21 Jun 2026 12:18:51 +0000 Subject: [PATCH 2/4] wordexp: clear positional parameters added 'set --' so $@, $*, $#, $1, $2 are cleared (does not seem to be in the spec, but cleaner) wordexp("$*", p, 0) was "$*","2>/dev/stderr", now empty list. --- src/misc/wordexp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/misc/wordexp.c b/src/misc/wordexp.c index 73349aac..c4154fad 100644 --- a/src/misc/wordexp.c +++ b/src/misc/wordexp.c @@ -112,7 +112,7 @@ static int do_wordexp(const char *s, wordexp_t *we, int flags) if (fd < 0 || dup2(fd, 2) < 0) close(2); } execl("/bin/sh", "sh", "-c", - "eval \"printf %s\\\\\\\\0 x $1\"", + "eval \"set --;printf %s\\\\\\\\0 x $1\"", "sh", s, (char *)0); _exit(1); } -- 2.52.0