diff options
author | Matt Kraai | 2001-04-04 17:50:04 +0000 |
---|---|---|
committer | Matt Kraai | 2001-04-04 17:50:04 +0000 |
commit | 2129f97cd9502b731f6489e4c8be54fd44affc1d (patch) | |
tree | 8d5a7542b1b51bf58de7383f9748971d2c2bcb06 | |
parent | 3f98040554313a50ba68c60f43cd8c4a987a0d24 (diff) | |
download | busybox-2129f97cd9502b731f6489e4c8be54fd44affc1d.zip busybox-2129f97cd9502b731f6489e4c8be54fd44affc1d.tar.gz |
Avoid segfault when export is invoked with no arguments. Thanks to
Gennady Feldman.
-rw-r--r-- | lash.c | 1 | ||||
-rw-r--r-- | sh.c | 1 | ||||
-rw-r--r-- | shell/lash.c | 1 |
3 files changed, 3 insertions, 0 deletions
@@ -426,6 +426,7 @@ static int builtin_export(struct child_prog *child) for (e = environ; *e; e++) { printf( "%s\n", *e); } + return 0; } res = putenv(v); if (res) @@ -426,6 +426,7 @@ static int builtin_export(struct child_prog *child) for (e = environ; *e; e++) { printf( "%s\n", *e); } + return 0; } res = putenv(v); if (res) diff --git a/shell/lash.c b/shell/lash.c index 28015cb..89325b6 100644 --- a/shell/lash.c +++ b/shell/lash.c @@ -426,6 +426,7 @@ static int builtin_export(struct child_prog *child) for (e = environ; *e; e++) { printf( "%s\n", *e); } + return 0; } res = putenv(v); if (res) |