[fix to r253380] __setenv: be explicit about placing '=' after name
This should a regression introduced in r253380 if malloc'ed memory happens to have '=' at the right place. Reported by: ache Pointyhat to: me (avg) MFC after: 1 day X-MFC with: r253380
This commit is contained in:
parent
245aaea467
commit
3dc57aad8c
@ -506,8 +506,7 @@ __setenv(const char *name, size_t nameLen, const char *value, int overwrite)
|
||||
|
||||
/* Save name of name/value pair. */
|
||||
env = stpncpy(envVars[envNdx].name, name, nameLen);
|
||||
if ((envVars[envNdx].name)[nameLen] != '=')
|
||||
env = stpcpy(env, "=");
|
||||
*env++ = '=';
|
||||
}
|
||||
else
|
||||
env = envVars[envNdx].value;
|
||||
|
Loading…
x
Reference in New Issue
Block a user