fix: fix cfg load enviroment variables crash when environ is NULL
This commit is contained in:
parent
af53a3a226
commit
3c70008b4b
|
@ -637,6 +637,8 @@ int32_t cfgLoadFromEnvVar(SConfig *pConfig) {
|
|||
int32_t code = 0;
|
||||
char **pEnv = environ;
|
||||
line[1023] = 0;
|
||||
|
||||
if (pEnv == NULL) return 0;
|
||||
while (*pEnv != NULL) {
|
||||
name = value = value2 = value3 = NULL;
|
||||
olen = vlen = vlen2 = vlen3 = 0;
|
||||
|
|
Loading…
Reference in New Issue