mirror of
https://github.com/reactos/reactos.git
synced 2024-09-30 22:47:28 +00:00
[ADVAPI32] Add parameter checks to LogonUserExW and initialize the token handle.
This commit is contained in:
parent
b4040ea740
commit
5ebcc6cdc1
|
@ -469,6 +469,20 @@ LogonUserExW(
|
|||
NTSTATUS SubStatus = STATUS_SUCCESS;
|
||||
NTSTATUS Status;
|
||||
|
||||
if ((ppProfileBuffer != NULL && pdwProfileLength == NULL) ||
|
||||
(ppProfileBuffer == NULL && pdwProfileLength != NULL))
|
||||
{
|
||||
SetLastError(ERROR_INVALID_PARAMETER);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (ppProfileBuffer != NULL && pdwProfileLength != NULL)
|
||||
{
|
||||
*ppProfileBuffer = NULL;
|
||||
*pdwProfileLength = 0;
|
||||
}
|
||||
|
||||
if (phToken != NULL)
|
||||
*phToken = NULL;
|
||||
|
||||
switch (dwLogonType)
|
||||
|
@ -654,9 +668,10 @@ LogonUserExW(
|
|||
TRACE("TokenHandle: %p\n", TokenHandle);
|
||||
}
|
||||
|
||||
if (phToken != NULL)
|
||||
*phToken = TokenHandle;
|
||||
|
||||
/* FIXME: return ppLogonSid, ppProfileBuffer, pdwProfileLength and pQuotaLimits */
|
||||
/* FIXME: return ppLogonSid and pQuotaLimits */
|
||||
|
||||
done:
|
||||
if (ProfileBuffer != NULL)
|
||||
|
|
Loading…
Reference in a new issue