[winpr,sam] fix inalid NULL arguments
This commit is contained in:
parent
39210d1efd
commit
2d16ab5255
@ -57,9 +57,11 @@ static WINPR_SAM_ENTRY* SamEntryFromDataA(LPCSTR User, DWORD UserLength, LPCSTR
|
||||
WINPR_SAM_ENTRY* entry = calloc(1, sizeof(WINPR_SAM_ENTRY));
|
||||
if (!entry)
|
||||
return NULL;
|
||||
entry->User = _strdup(User);
|
||||
if (User && (UserLength > 0))
|
||||
entry->User = _strdup(User);
|
||||
entry->UserLength = UserLength;
|
||||
entry->Domain = _strdup(Domain);
|
||||
if (Domain && (DomainLength > 0))
|
||||
entry->Domain = _strdup(Domain);
|
||||
entry->DomainLength = DomainLength;
|
||||
return entry;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user