summaryrefslogtreecommitdiff
path: root/shell/ash.c
diff options
context:
space:
mode:
authorPaul Fox2005-07-20 19:18:45 +0000
committerPaul Fox2005-07-20 19:18:45 +0000
commit6f267f022f4a1cc47b3b3607f193637262ee69e6 (patch)
treecf89e32bf990da7bfdab99e1b96f2b61213764bc /shell/ash.c
parent01f67987e0aa4a4890a02d1a7445d878d3436d26 (diff)
downloadbusybox-6f267f022f4a1cc47b3b3607f193637262ee69e6.zip
busybox-6f267f022f4a1cc47b3b3607f193637262ee69e6.tar.gz
applying fix for:
0000261: Unsafe empty env var export in ash
Diffstat (limited to 'shell/ash.c')
-rw-r--r--shell/ash.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/shell/ash.c b/shell/ash.c
index 045d659..8656c02 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -12001,9 +12001,8 @@ setvar(const char *name, const char *val, int flags)
}
INTOFF;
p = mempcpy(nameeq = ckmalloc(namelen + vallen + 2), name, namelen);
- *p++ = '\0';
+ *p++ = '=';
if (vallen) {
- p[-1] = '=';
p = mempcpy(p, val, vallen);
}
*p = '\0';