mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 21:05:43 +00:00
[NTOS:KE:X64] Zero out the context in KiDispatchException
This commit is contained in:
parent
637183a12c
commit
f66a7e2e48
1 changed files with 4 additions and 1 deletions
|
@ -245,10 +245,13 @@ KiDispatchException(IN PEXCEPTION_RECORD ExceptionRecord,
|
||||||
/* Increase number of Exception Dispatches */
|
/* Increase number of Exception Dispatches */
|
||||||
KeGetCurrentPrcb()->KeExceptionDispatchCount++;
|
KeGetCurrentPrcb()->KeExceptionDispatchCount++;
|
||||||
|
|
||||||
|
/* Zero out the context to avoid leaking kernel stack memor to user mode */
|
||||||
|
RtlZeroMemory(&Context, sizeof(Context));
|
||||||
|
|
||||||
/* Set the context flags */
|
/* Set the context flags */
|
||||||
Context.ContextFlags = CONTEXT_ALL;
|
Context.ContextFlags = CONTEXT_ALL;
|
||||||
|
|
||||||
/* Get a Context */
|
/* Get the Context from the trap and exception frame */
|
||||||
KeTrapFrameToContext(TrapFrame, ExceptionFrame, &Context);
|
KeTrapFrameToContext(TrapFrame, ExceptionFrame, &Context);
|
||||||
|
|
||||||
/* Look at our exception code */
|
/* Look at our exception code */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue