mirror of
https://github.com/reactos/reactos.git
synced 2026-05-31 16:31:07 +08:00
[ADVAPI32] Add parameter checks to LogonUserExW and initialize the token handle.
This commit is contained in:
@@ -469,7 +469,21 @@ LogonUserExW(
|
||||
NTSTATUS SubStatus = STATUS_SUCCESS;
|
||||
NTSTATUS Status;
|
||||
|
||||
*phToken = NULL;
|
||||
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);
|
||||
}
|
||||
|
||||
*phToken = TokenHandle;
|
||||
if (phToken != NULL)
|
||||
*phToken = TokenHandle;
|
||||
|
||||
/* FIXME: return ppLogonSid, ppProfileBuffer, pdwProfileLength and pQuotaLimits */
|
||||
/* FIXME: return ppLogonSid and pQuotaLimits */
|
||||
|
||||
done:
|
||||
if (ProfileBuffer != NULL)
|
||||
|
||||
Reference in New Issue
Block a user