mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 01:24:38 +00:00
clear out the lower 2 bits of a pid before using it to calculate the hash as they may vary
svn path=/trunk/; revision=16849
This commit is contained in:
parent
d0f433ab3a
commit
a661e95cdf
1 changed files with 3 additions and 3 deletions
|
@ -37,7 +37,7 @@ PCSRSS_PROCESS_DATA STDCALL CsrGetProcessData(HANDLE ProcessId)
|
|||
ULONG hash;
|
||||
PCSRSS_PROCESS_DATA pProcessData;
|
||||
|
||||
hash = (ULONG_PTR)ProcessId % (sizeof(ProcessData) / sizeof(*ProcessData));
|
||||
hash = ((ULONG_PTR)ProcessId & ~0x3) % (sizeof(ProcessData) / sizeof(*ProcessData));
|
||||
|
||||
LOCK;
|
||||
|
||||
|
@ -59,7 +59,7 @@ PCSRSS_PROCESS_DATA STDCALL CsrCreateProcessData(HANDLE ProcessId)
|
|||
CLIENT_ID ClientId;
|
||||
NTSTATUS Status;
|
||||
|
||||
hash = (ULONG_PTR)ProcessId % (sizeof(ProcessData) / sizeof(*ProcessData));
|
||||
hash = ((ULONG_PTR)ProcessId & ~0x3) % (sizeof(ProcessData) / sizeof(*ProcessData));
|
||||
|
||||
LOCK;
|
||||
|
||||
|
@ -121,7 +121,7 @@ NTSTATUS STDCALL CsrFreeProcessData(HANDLE Pid)
|
|||
UINT c;
|
||||
PCSRSS_PROCESS_DATA pProcessData, pPrevProcessData = NULL;
|
||||
|
||||
hash = (ULONG_PTR)Pid % (sizeof(ProcessData) / sizeof(*ProcessData));
|
||||
hash = ((ULONG_PTR)Pid & ~0x3) % (sizeof(ProcessData) / sizeof(*ProcessData));
|
||||
|
||||
LOCK;
|
||||
|
||||
|
|
Loading…
Reference in a new issue