Prepare for upcoming POSIXed putenv() rewrite:

don't allow putenv() arg be on the stack, use strdup()
This commit is contained in:
Andrey A. Chernov 2007-04-30 13:07:33 +00:00
parent 5cc9512ae2
commit 322627150d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=169128
2 changed files with 2 additions and 2 deletions

View File

@ -307,7 +307,7 @@ pvariable_set(char *var)
if (index(var, '=') == NULL)
msgFatal("Invalid variable format: %s", var);
strlcat(tmp, var, 1024);
putenv(tmp);
(void)putenv(strdup(tmp));
}
char *

View File

@ -312,7 +312,7 @@ pvariable_set(char *var)
if (index(var, '=') == NULL)
msgFatal("Invalid variable format: %s", var);
strlcat(tmp, var, 1024);
putenv(tmp);
(void)putenv(strdup(tmp));
}
char *