Prepare for upcoming POSIXed putenv() rewrite:
don't allow putenv() arg be on the stack, use strdup()
This commit is contained in:
parent
b04643bc9f
commit
769eaedef1
@ -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…
x
Reference in New Issue
Block a user