[Wine-patches] ntoskrnl.exe: Fix the stack overflow bugs in raising exceptions (DLL_PROCESS_DETACH processing for DllMain in ntoskrnl.c) (eterbug 2399)
Anton Rudnev
=?iso-8859-1?q?mibori_=CE=C1_etersoft=2Eru?=
Ср Окт 15 14:00:46 MSD 2008
В сообщении от Monday 13 October 2008 16:27:28 Anton Rudnev написал(а):
> ntoskrnl.exe: Fix the stack overflow bugs in raising exceptions
> (DLL_PROCESS_DETACH processing for DllMain in ntoskrnl.c) (eterbug 2399)
Коррекция последнего патча по баге 2399: удалены лишние пробелы из
исходника :)
--
Руднев Антон
----------- следующая часть -----------
From 7a6b9f8f69367e958047abc297baddce5b5384e4 Mon Sep 17 00:00:00 2001
From: Anton Rudnev <mibori на builder.office.etersoft.ru>
Date: Tue, 7 Oct 2008 17:58:46 +0400
Subject: [PATCH] ntoskrnl.exe: Fix the stack overflow bugs in raising exceptions (DLL_PROCESS_DETACH processing for DllMain in ntoskrnl.c)
eterbug 2399
---
dlls/ntoskrnl.exe/ntoskrnl.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c
index 123a558..bb40a58 100644
--- a/dlls/ntoskrnl.exe/ntoskrnl.c
+++ b/dlls/ntoskrnl.exe/ntoskrnl.c
@@ -886,14 +886,17 @@ NTSTATUS WINAPI PsSetCreateProcessNotifyRoutine( PCREATE_PROCESS_NOTIFY_ROUTINE
BOOL WINAPI DllMain( HINSTANCE inst, DWORD reason, LPVOID reserved )
{
LARGE_INTEGER count;
+ static vectored_handler_added;
switch(reason)
{
case DLL_PROCESS_ATTACH:
DisableThreadLibraryCalls( inst );
- RtlAddVectoredExceptionHandler( TRUE, vectored_handler );
+ vectored_handler_added = RtlAddVectoredExceptionHandler( TRUE, vectored_handler );
KeQueryTickCount( &count ); /* initialize the global KeTickCount */
break;
+ case DLL_PROCESS_DETACH:
+ RtlRemoveVectoredExceptionHandler(vectored_handler_added);
}
return TRUE;
}
--
1.5.6.5.GIT
Подробная информация о списке рассылки Wine-patches