mirror of
https://github.com/reactos/reactos.git
synced 2024-12-14 06:33:30 +08:00
[CSRSRV] Protect the Server DLL entrypoint calls under SEH.
This commit is contained in:
parent
835f3ef13d
commit
dd77ac67d0
@ -205,6 +205,9 @@ CsrLoadServerDll(IN PCHAR DllString,
|
||||
else
|
||||
{
|
||||
/* No handle, so we are loading ourselves */
|
||||
#ifdef CSR_DBG
|
||||
RtlInitAnsiString(&EntryPointString, "CsrServerDllInitialization");
|
||||
#endif
|
||||
ServerDllInitProcedure = CsrServerDllInitialization;
|
||||
Status = STATUS_SUCCESS;
|
||||
}
|
||||
@ -212,8 +215,21 @@ CsrLoadServerDll(IN PCHAR DllString,
|
||||
/* Check if we got the pointer, and call it */
|
||||
if (NT_SUCCESS(Status))
|
||||
{
|
||||
/* Get the result from the Server DLL */
|
||||
Status = ServerDllInitProcedure(ServerDll);
|
||||
/* Call the Server DLL entrypoint */
|
||||
_SEH2_TRY
|
||||
{
|
||||
Status = ServerDllInitProcedure(ServerDll);
|
||||
}
|
||||
_SEH2_EXCEPT(CsrUnhandledExceptionFilter(_SEH2_GetExceptionInformation()))
|
||||
{
|
||||
Status = _SEH2_GetExceptionCode();
|
||||
#ifdef CSR_DBG
|
||||
DPRINT1("CSRSS: Exception 0x%lx while calling Server DLL entrypoint %Z!%Z()\n",
|
||||
Status, &DllName, &EntryPointString);
|
||||
#endif
|
||||
}
|
||||
_SEH2_END;
|
||||
|
||||
if (NT_SUCCESS(Status))
|
||||
{
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user