[CSRSRV]
authorHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Tue, 1 Jan 2013 02:21:05 +0000 (02:21 +0000)
committerHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Tue, 1 Jan 2013 02:21:05 +0000 (02:21 +0000)
Be sure to REALLY compare the Client ID (both Process and Thread handles).

svn path=/branches/ros-csrss/; revision=58074

subsystems/win32/csrsrv/thredsup.c

index 2dc9df0..5b74aa4 100644 (file)
@@ -205,8 +205,9 @@ CsrLocateThreadByClientId(OUT PCSR_PROCESS *Process OPTIONAL,
         NextEntry = NextEntry->Flink;
 
         /* Compare the CID */
-        // FIXME: if (*(PULONGLONG)&FoundThread->ClientId == *(PULONGLONG)ClientId)
-        if (FoundThread->ClientId.UniqueThread == ClientId->UniqueThread)
+        // if (*(PULONGLONG)&FoundThread->ClientId == *(PULONGLONG)ClientId)
+        if ( FoundThread->ClientId.UniqueProcess == ClientId->UniqueProcess &&
+             FoundThread->ClientId.UniqueThread  == ClientId->UniqueThread )
         {
             /* Match found, return the process */
             *Process = FoundThread->Process;