Avoid segfault when export is invoked with no arguments. Thanks to
Gennady Feldman.
This commit is contained in:
1 parent
3f98040554
commit
2129f97cd9
3 files changed
+3
No files matched your search
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user