mirror of https://github.com/FreeRDP/FreeRDP
[core,proxy] ignore empty variable
fixes #9928: ignore a defined but empty proxy environment variable
This commit is contained in:
parent
4b2e192869
commit
3b108f1839
|
@ -284,14 +284,12 @@ static BOOL check_no_proxy(rdpSettings* settings, const char* no_proxy)
|
||||||
|
|
||||||
void proxy_read_environment(rdpSettings* settings, char* envname)
|
void proxy_read_environment(rdpSettings* settings, char* envname)
|
||||||
{
|
{
|
||||||
DWORD envlen = 0;
|
const DWORD envlen = GetEnvironmentVariableA(envname, NULL, 0);
|
||||||
char* env = NULL;
|
|
||||||
envlen = GetEnvironmentVariableA(envname, NULL, 0);
|
|
||||||
|
|
||||||
if (!envlen)
|
if (!envlen || (envlen <= 1))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
env = calloc(1, envlen);
|
char* env = calloc(1, envlen);
|
||||||
|
|
||||||
if (!env)
|
if (!env)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue