reactos/subsys/csrss/api
diff -u -r1.33 -r1.34
--- process.c 9 Apr 2004 20:03:15 -0000 1.33
+++ process.c 27 Jun 2004 10:16:59 -0000 1.34
@@ -1,4 +1,4 @@
-/* $Id: process.c,v 1.33 2004/04/09 20:03:15 navaraf Exp $
+/* $Id: process.c,v 1.34 2004/06/27 10:16:59 weiden Exp $
*
* reactos/subsys/csrss/api/process.c
*
@@ -411,6 +411,11 @@
Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - LPC_MESSAGE_BASE_SIZE;
ProcessData = CsrGetProcessData(Request->Data.DuplicateHandleRequest.ProcessId);
+ if (ProcessData == NULL)
+ {
+ DPRINT1("CsrGetProcessData() failed for process 0x%x, unable to dublicate handle\n", Request->Data.DuplicateHandleRequest.ProcessId);
+ return STATUS_INVALID_HANDLE;
+ }
Reply->Status = CsrGetObject(ProcessData, Request->Data.DuplicateHandleRequest.Handle, &Object);
if (! NT_SUCCESS(Reply->Status))
{
reactos/subsys/csrss/api
diff -u -r1.34 -r1.35
--- wapi.c 9 Apr 2004 20:03:15 -0000 1.34
+++ wapi.c 27 Jun 2004 10:16:59 -0000 1.35
@@ -1,4 +1,4 @@
-/* $Id: wapi.c,v 1.34 2004/04/09 20:03:15 navaraf Exp $
+/* $Id: wapi.c,v 1.35 2004/06/27 10:16:59 weiden Exp $
*
* reactos/subsys/csrss/api/wapi.c
*
@@ -135,7 +135,12 @@
Reply = (PCSRSS_API_REPLY)&LpcReply;
ProcessData = CsrGetProcessData((ULONG)LpcRequest.Header.ClientId.UniqueProcess);
-
+ if (ProcessData == NULL)
+ {
+ DPRINT1("CSR: Unable to find process data for process 0x%x\n", (ULONG)LpcRequest.Header.ClientId.UniqueProcess);
+ NtClose(ServerPort);
+ continue;
+ }
CsrApiCallHandler(ProcessData, Request, Reply);
}
}
@@ -182,6 +187,12 @@
}
ProcessData = CsrGetProcessData((ULONG)Request.Header.ClientId.UniqueProcess);
+ if (ProcessData == NULL)
+ {
+ DPRINT1("CSR: Unable to find process data for process 0x%x\n", (ULONG)Request.Header.ClientId.UniqueProcess);
+ NtClose(ServerPort);
+ continue;
+ }
ProcessData->CsrSectionViewBase = LpcRead.ViewBase;
ProcessData->CsrSectionViewSize = LpcRead.ViewSize;