diff options
author | Eric Andersen <andersen@codepoet.org> | 2003-11-04 01:46:14 +0300 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2003-11-04 01:46:14 +0300 |
commit | b7077a7316fa3b1a0efa8247479c64a67ef1d87c (patch) | |
tree | 338f37d2efdf77b6b135a935f54cadbb90dc837a /coreutils/env.c | |
parent | 04d055f4e11469f74bdde38837deefab27edb2e9 (diff) |
Set unset_env pointing to a NULL item, to prevent us from walking
off the end of the list and segfaulting.
-Erik
Diffstat (limited to 'coreutils/env.c')
-rw-r--r-- | coreutils/env.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/coreutils/env.c b/coreutils/env.c index d8a76e364..d8b428561 100644 --- a/coreutils/env.c +++ b/coreutils/env.c @@ -62,9 +62,13 @@ extern int env_main(int argc, char** argv) char **ep, *p; char *cleanenv[1] = { NULL }; unsigned long opt; - llist_t *unset_env; + llist_t list, *unset_env; extern char **environ; + list.data = NULL; + list.link = NULL; + unset_env = &list; + bb_opt_complementaly = "u*"; bb_applet_long_options = env_long_options; |