[winpr,sam] fix inalid NULL arguments
@@ -57,8 +57,10 @@ static WINPR_SAM_ENTRY* SamEntryFromDataA(LPCSTR User, DWORD UserLength, LPCSTR
WINPR_SAM_ENTRY* entry = calloc(1, sizeof(WINPR_SAM_ENTRY));
if (!entry)
return NULL;
+ if (User && (UserLength > 0))
entry->User = _strdup(User);
entry->UserLength = UserLength;
+ if (Domain && (DomainLength > 0))
entry->Domain = _strdup(Domain);
entry->DomainLength = DomainLength;
return entry;
