fixed NULL dereference
This commit is contained in:
parent
45f407c021
commit
67fbf15741
|
@ -178,12 +178,14 @@ sc_ctx_win32_get_config_value(const char *name_env,
|
|||
|
||||
if (name_env) {
|
||||
char *value = value = getenv(name_env);
|
||||
if (value) {
|
||||
if (strlen(value) < *out_len)
|
||||
return SC_ERROR_NOT_ENOUGH_MEMORY;
|
||||
memcpy(out, value, strlen(value));
|
||||
*out_len = strlen(value);
|
||||
return SC_SUCCESS;
|
||||
}
|
||||
}
|
||||
|
||||
if (!name_reg)
|
||||
return SC_ERROR_INVALID_ARGUMENTS;
|
||||
|
|
Loading…
Reference in New Issue