Merge pull request #10348 from Frederick888/fix-ipvx-without-force

[client,common] fix /ipv4 /ipv6 without :force
This commit is contained in:
akallabeth 2024-07-05 01:26:25 +01:00 committed by GitHub
commit 7e83c2380d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -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);