From: Paul Fox Date: Wed, 20 Jul 2005 19:18:45 +0000 (-0000) Subject: applying fix for: X-Git-Tag: 1_1_0~890 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=6f267f022f4a1cc47b3b3607f193637262ee69e6;p=oweals%2Fbusybox.git applying fix for: 0000261: Unsafe empty env var export in ash --- 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';