From 6f267f022f4a1cc47b3b3607f193637262ee69e6 Mon Sep 17 00:00:00 2001 From: Paul Fox Date: Wed, 20 Jul 2005 19:18:45 +0000 Subject: [PATCH] applying fix for: 0000261: Unsafe empty env var export in ash --- shell/ash.c | 3 +-- 1 file changed, 1 insertion(+), 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'; -- 2.25.1