mirror of
https://github.com/reactos/reactos.git
synced 2024-10-05 17:06:29 +00:00
[LSASRV]
Fix memory related issues in calls to LsaEnumerateLogonSessions. - Initialize ClientBaseAddress to NULL because we do not need to allocate a fixed memory page. - Protect Length from being overwitten by NtWriteVirtualMemory. svn path=/trunk/; revision=64318
This commit is contained in:
parent
3ac9edfd99
commit
d3c1b50d46
|
@ -131,8 +131,8 @@ LsapEnumLogonSessions(IN OUT PLSA_API_MSG RequestMsg)
|
|||
PLIST_ENTRY SessionEntry;
|
||||
PLSAP_LOGON_SESSION CurrentSession;
|
||||
PLUID SessionList;
|
||||
ULONG i, Length;
|
||||
PVOID ClientBaseAddress;
|
||||
ULONG i, Length, MemSize;
|
||||
PVOID ClientBaseAddress = NULL;
|
||||
NTSTATUS Status;
|
||||
|
||||
TRACE("LsapEnumLogonSessions()\n");
|
||||
|
@ -175,10 +175,11 @@ LsapEnumLogonSessions(IN OUT PLSA_API_MSG RequestMsg)
|
|||
goto done;
|
||||
}
|
||||
|
||||
MemSize = Length;
|
||||
Status = NtAllocateVirtualMemory(ProcessHandle,
|
||||
&ClientBaseAddress,
|
||||
0,
|
||||
&Length,
|
||||
&MemSize,
|
||||
MEM_COMMIT,
|
||||
PAGE_READWRITE);
|
||||
if (!NT_SUCCESS(Status))
|
||||
|
|
Loading…
Reference in a new issue