diff options
author | Paul Fox <pgf@brightstareng.com> | 2005-07-20 19:18:45 +0000 |
---|---|---|
committer | Paul Fox <pgf@brightstareng.com> | 2005-07-20 19:18:45 +0000 |
commit | 6f267f022f4a1cc47b3b3607f193637262ee69e6 (patch) | |
tree | cf89e32bf990da7bfdab99e1b96f2b61213764bc | |
parent | 01f67987e0aa4a4890a02d1a7445d878d3436d26 (diff) |
applying fix for:
0000261: Unsafe empty env var export in ash
-rw-r--r-- | shell/ash.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/shell/ash.c b/shell/ash.c index 045d659ed..8656c0219 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'; |