From d6628e3e232179b66050c48310d0b3ad3f9eb817 Mon Sep 17 00:00:00 2001 From: Thomas Bluemel Date: Thu, 20 Jan 2005 00:31:52 +0000 Subject: [PATCH] wrap access to foreign Peb with SEH svn path=/trunk/; revision=13147 --- reactos/ntoskrnl/ps/process.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/reactos/ntoskrnl/ps/process.c b/reactos/ntoskrnl/ps/process.c index 4dc779f2bf4..e4beb3a5530 100644 --- a/reactos/ntoskrnl/ps/process.c +++ b/reactos/ntoskrnl/ps/process.c @@ -1720,7 +1720,15 @@ NtSetInformationProcess(IN HANDLE ProcessHandle, process so we're sure we're in the right context! */ KeAttachProcess(&Process->Pcb); - Process->Peb->BeingDebugged = TRUE; + _SEH_TRY + { + Process->Peb->BeingDebugged = TRUE; + } + _SEH_HANDLE + { + DPRINT1("Trying to set the Peb->BeingDebugged field of process 0x%x failed, exception: 0x%x\n", Process, _SEH_GetExceptionCode()); + } + _SEH_END; KeDetachProcess(); } Status = STATUS_SUCCESS;