aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Kraai <kraai@debian.org>2001-04-04 17:50:04 +0000
committerMatt Kraai <kraai@debian.org>2001-04-04 17:50:04 +0000
commit2129f97cd9502b731f6489e4c8be54fd44affc1d (patch)
tree8d5a7542b1b51bf58de7383f9748971d2c2bcb06
parent3f98040554313a50ba68c60f43cd8c4a987a0d24 (diff)
downloadbusybox-w32-2129f97cd9502b731f6489e4c8be54fd44affc1d.tar.gz
busybox-w32-2129f97cd9502b731f6489e4c8be54fd44affc1d.tar.bz2
busybox-w32-2129f97cd9502b731f6489e4c8be54fd44affc1d.zip
Avoid segfault when export is invoked with no arguments. Thanks to
Gennady Feldman.
-rw-r--r--lash.c1
-rw-r--r--sh.c1
-rw-r--r--shell/lash.c1
3 files changed, 3 insertions, 0 deletions
diff --git a/lash.c b/lash.c
index 28015cbb3..89325b63d 100644
--- a/lash.c
+++ b/lash.c
@@ -426,6 +426,7 @@ static int builtin_export(struct child_prog *child)
426 for (e = environ; *e; e++) { 426 for (e = environ; *e; e++) {
427 printf( "%s\n", *e); 427 printf( "%s\n", *e);
428 } 428 }
429 return 0;
429 } 430 }
430 res = putenv(v); 431 res = putenv(v);
431 if (res) 432 if (res)
diff --git a/sh.c b/sh.c
index 28015cbb3..89325b63d 100644
--- a/sh.c
+++ b/sh.c
@@ -426,6 +426,7 @@ static int builtin_export(struct child_prog *child)
426 for (e = environ; *e; e++) { 426 for (e = environ; *e; e++) {
427 printf( "%s\n", *e); 427 printf( "%s\n", *e);
428 } 428 }
429 return 0;
429 } 430 }
430 res = putenv(v); 431 res = putenv(v);
431 if (res) 432 if (res)
diff --git a/shell/lash.c b/shell/lash.c
index 28015cbb3..89325b63d 100644
--- a/shell/lash.c
+++ b/shell/lash.c
@@ -426,6 +426,7 @@ static int builtin_export(struct child_prog *child)
426 for (e = environ; *e; e++) { 426 for (e = environ; *e; e++) {
427 printf( "%s\n", *e); 427 printf( "%s\n", *e);
428 } 428 }
429 return 0;
429 } 430 }
430 res = putenv(v); 431 res = putenv(v);
431 if (res) 432 if (res)