Alexandre Julliard : wow64: Push a valid return address when calling KiRaiseUserExceptionDispatcher.
Module: wine Branch: master Commit: 96841d0358fe35c448fce4ad494a1db98f3f2e7a URL: https://gitlab.winehq.org/wine/wine/-/commit/96841d0358fe35c448fce4ad494a1db... Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Mar 7 17:21:40 2023 +0100 wow64: Push a valid return address when calling KiRaiseUserExceptionDispatcher. --- dlls/wow64/syscall.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dlls/wow64/syscall.c b/dlls/wow64/syscall.c index 1feeac083d9..de5a42aec4f 100644 --- a/dlls/wow64/syscall.c +++ b/dlls/wow64/syscall.c @@ -278,6 +278,8 @@ static void call_raise_user_exception_dispatcher( ULONG code ) I386_CONTEXT ctx = { CONTEXT_I386_ALL }; pBTCpuGetContext( GetCurrentThread(), GetCurrentProcess(), NULL, &ctx ); + ctx.Esp -= sizeof(ULONG); + *(ULONG *)ULongToPtr( ctx.Esp ) = ctx.Eip; ctx.Eip = (ULONG_PTR)pKiRaiseUserExceptionDispatcher; pBTCpuSetContext( GetCurrentThread(), GetCurrentProcess(), NULL, &ctx ); }
participants (1)
-
Alexandre Julliard