[client,common] fix /ipv4 /ipv6 without :force
As arg->Value is NULL when using /ipv4 or /ipv6 alone, it segfaulted doing strncmp.
This commit is contained in:
parent
8495c79dd0
commit
919a692abc
@ -4600,7 +4600,7 @@ static int freerdp_client_settings_parse_command_line_arguments_int(
|
||||
}
|
||||
CommandLineSwitchCase(arg, "ipv4")
|
||||
{
|
||||
if (strncmp(arg->Value, "force", 6) == 0)
|
||||
if (arg->Value != NULL && strncmp(arg->Value, "force", 6) == 0)
|
||||
{
|
||||
if (!freerdp_settings_set_uint32(settings, FreeRDP_ForceIPvX, 4))
|
||||
return fail_at(arg, COMMAND_LINE_ERROR);
|
||||
@ -4613,7 +4613,7 @@ static int freerdp_client_settings_parse_command_line_arguments_int(
|
||||
}
|
||||
CommandLineSwitchCase(arg, "ipv6")
|
||||
{
|
||||
if (strncmp(arg->Value, "force", 6) == 0)
|
||||
if (arg->Value != NULL && strncmp(arg->Value, "force", 6) == 0)
|
||||
{
|
||||
if (!freerdp_settings_set_uint32(settings, FreeRDP_ForceIPvX, 6))
|
||||
return fail_at(arg, COMMAND_LINE_ERROR);
|
||||
|
Loading…
Reference in New Issue
Block a user