musl - musl - an implementation of the standard library for Linux-based systems

index : musl
musl - an implementation of the standard library for Linux-based systems
summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/misc/wordexp.c 4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/misc/wordexp.c b/src/misc/wordexp.c
index 34fc900a..15adddbe 100644
--- a/src/misc/wordexp.c
+++ b/src/misc/wordexp.c
@@ -139,6 +139,10 @@ static int do_wordexp(const char *s, wordexp_t *we, int flags)
we->we_wordv = wv;
we->we_wordc = i;
+
+ for (i=we->we_offs; i; i--)
+ we->we_wordv[i-1] = 0;
+
if (flags & WRDE_DOOFFS) we->we_wordc -= we->we_offs;
return err;
}
generated by cgit v1.2.1 (git 2.18.0) at 2025年09月20日 03:39:20 +0000

AltStyle によって変換されたページ (->オリジナル) /