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