Prepare for upcoming POSIXed putenv() rewrite:
don't allow putenv() arg be on the stack, use strdup()
This commit is contained in:
parent
5cc9512ae2
commit
322627150d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=169128
@ -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 *
|
||||
|
@ -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 *
|
||||
|
Loading…
Reference in New Issue
Block a user