api: don't pass bogus previous buffer size argument
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
parent
e51b49604b
commit
4480d32011
@ -77,7 +77,7 @@ _Return_type_success_(return != FALSE) BOOL ElevateToSystem(void)
|
||||
LastError = GetLastError();
|
||||
continue;
|
||||
}
|
||||
Ret = AdjustTokenPrivileges(ThreadToken, FALSE, &Privileges, sizeof(Privileges), NULL, NULL);
|
||||
Ret = AdjustTokenPrivileges(ThreadToken, FALSE, &Privileges, 0, NULL, NULL);
|
||||
LastError = GetLastError();
|
||||
CloseHandle(ThreadToken);
|
||||
if (!Ret)
|
||||
@ -170,7 +170,7 @@ _Return_type_success_(return != NULL) HANDLE GetPrimarySystemTokenFromThread(voi
|
||||
LastError = LOG_LAST_ERROR(L"Failed to lookup privilege value");
|
||||
goto cleanup;
|
||||
}
|
||||
Ret = AdjustTokenPrivileges(CurrentToken, FALSE, &Privileges, sizeof(Privileges), NULL, NULL);
|
||||
Ret = AdjustTokenPrivileges(CurrentToken, FALSE, &Privileges, 0, NULL, NULL);
|
||||
if (!Ret)
|
||||
{
|
||||
LastError = LOG_LAST_ERROR(L"Failed to adjust token privileges");
|
||||
|
Loading…
Reference in New Issue
Block a user