applying fix for:

0000261: Unsafe empty env var export in ash
This commit is contained in:
Paul Fox 2005-07-20 19:18:45 +00:00
parent 01f67987e0
commit 6f267f022f

View File

@ -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';