summaryrefslogtreecommitdiff
path: root/editors
diff options
context:
space:
mode:
Diffstat (limited to 'editors')
-rw-r--r--editors/awk.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/editors/awk.c b/editors/awk.c
index af89589..c0e1a71 100644
--- a/editors/awk.c
+++ b/editors/awk.c
@@ -2670,8 +2670,12 @@ extern int awk_main(int argc, char **argv) {
for (envp=environ; *envp; envp++) {
s = bb_xstrdup(*envp);
s1 = strchr(s, '=');
+ if (!s1) {
+ goto keep_going;
+ }
*(s1++) = '\0';
setvar_u(findvar(iamarray(V[ENVIRON]), s), s1);
+keep_going:
free(s);
}