From 039e4a7b2e2db0e07612f4d1a8fd643c27dee187 Mon Sep 17 00:00:00 2001 From: Magnus Olsen Date: Fri, 27 Apr 2007 19:11:22 +0000 Subject: [PATCH] patch by hto. Fixing the crash in win32k after user-mode callback Some forget use seh. all user mode param shall always be using seh. See issue #2212 for more details. svn path=/trunk/; revision=26546 --- reactos/subsystems/win32/win32k/ntuser/callback.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/reactos/subsystems/win32/win32k/ntuser/callback.c b/reactos/subsystems/win32/win32k/ntuser/callback.c index a9b3ac18233..8a33f39627a 100644 --- a/reactos/subsystems/win32/win32k/ntuser/callback.c +++ b/reactos/subsystems/win32/win32k/ntuser/callback.c @@ -195,8 +195,16 @@ co_IntCallWindowProc(WNDPROC Proc, &ResultPointer, &ResultLength); - /* Simulate old behaviour: copy into our local buffer */ - RtlMoveMemory(Arguments, ResultPointer, ArgumentLength); + _SEH_TRY + { + /* Simulate old behaviour: copy into our local buffer */ + RtlMoveMemory(Arguments, ResultPointer, ArgumentLength); + } + _SEH_HANDLE + { + Status = _SEH_GetExceptionCode(); + } + _SEH_END; UserEnterCo();