[common,assist] fix file parser (Fixes #9726)
* only append N or U entry if it was found * append port for N and U entries
This commit is contained in:
parent
33447dc16e
commit
fbc25978ae
@ -660,12 +660,20 @@ static BOOL freerdp_assistance_parse_all_elements_of_l(rdpAssistanceFile* file,
|
||||
if (!freerdp_assistance_parse_attr(&u, &ulen, "U", data))
|
||||
return FALSE;
|
||||
|
||||
if (!ArrayList_Append(file->MachineAddresses, strndup(n, nlen)))
|
||||
return FALSE;
|
||||
if (!ArrayList_Append(file->MachineAddresses, strndup(u, ulen)))
|
||||
return FALSE;
|
||||
if (!ArrayList_Append(file->MachinePorts, (void*)(uintptr_t)p))
|
||||
return FALSE;
|
||||
if (n && (nlen > 0))
|
||||
{
|
||||
if (!ArrayList_Append(file->MachineAddresses, strndup(n, nlen)))
|
||||
return FALSE;
|
||||
if (!ArrayList_Append(file->MachinePorts, (void*)(uintptr_t)p))
|
||||
return FALSE;
|
||||
}
|
||||
if (u && (ulen > 0))
|
||||
{
|
||||
if (!ArrayList_Append(file->MachineAddresses, strndup(u, ulen)))
|
||||
return FALSE;
|
||||
if (!ArrayList_Append(file->MachinePorts, (void*)(uintptr_t)p))
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user