ntdll: Encode the function pointers in the vectored handler list.
This commit is contained in:
parent
2497a91f6b
commit
30cb179fe2
|
@ -155,6 +155,7 @@ LONG call_vectored_handlers( EXCEPTION_RECORD *rec, CONTEXT *context )
|
|||
struct list *ptr;
|
||||
LONG ret = EXCEPTION_CONTINUE_SEARCH;
|
||||
EXCEPTION_POINTERS except_ptrs;
|
||||
PVECTORED_EXCEPTION_HANDLER func;
|
||||
VECTORED_HANDLER *handler, *to_free = NULL;
|
||||
|
||||
except_ptrs.ExceptionRecord = rec;
|
||||
|
@ -166,14 +167,15 @@ LONG call_vectored_handlers( EXCEPTION_RECORD *rec, CONTEXT *context )
|
|||
{
|
||||
handler = LIST_ENTRY( ptr, VECTORED_HANDLER, entry );
|
||||
handler->count++;
|
||||
func = RtlDecodePointer( handler->func );
|
||||
RtlLeaveCriticalSection( &vectored_handlers_section );
|
||||
RtlFreeHeap( GetProcessHeap(), 0, to_free );
|
||||
to_free = NULL;
|
||||
|
||||
TRACE( "calling handler at %p code=%x flags=%x\n",
|
||||
handler->func, rec->ExceptionCode, rec->ExceptionFlags );
|
||||
ret = handler->func( &except_ptrs );
|
||||
TRACE( "handler at %p returned %x\n", handler->func, ret );
|
||||
func, rec->ExceptionCode, rec->ExceptionFlags );
|
||||
ret = func( &except_ptrs );
|
||||
TRACE( "handler at %p returned %x\n", func, ret );
|
||||
|
||||
RtlEnterCriticalSection( &vectored_handlers_section );
|
||||
ptr = list_next( &vectored_handlers, ptr );
|
||||
|
@ -226,7 +228,7 @@ PVOID WINAPI RtlAddVectoredExceptionHandler( ULONG first, PVECTORED_EXCEPTION_HA
|
|||
VECTORED_HANDLER *handler = RtlAllocateHeap( GetProcessHeap(), 0, sizeof(*handler) );
|
||||
if (handler)
|
||||
{
|
||||
handler->func = func;
|
||||
handler->func = RtlEncodePointer( func );
|
||||
handler->count = 1;
|
||||
RtlEnterCriticalSection( &vectored_handlers_section );
|
||||
if (first) list_add_head( &vectored_handlers, &handler->entry );
|
||||
|
|
|
@ -2298,6 +2298,7 @@ NTSYSAPI BOOLEAN WINAPI RtlCreateUnicodeString(PUNICODE_STRING,LPCWSTR);
|
|||
NTSYSAPI BOOLEAN WINAPI RtlCreateUnicodeStringFromAsciiz(PUNICODE_STRING,LPCSTR);
|
||||
NTSYSAPI NTSTATUS WINAPI RtlCreateUserThread(HANDLE,const SECURITY_DESCRIPTOR*,BOOLEAN,PVOID,SIZE_T,SIZE_T,PRTL_THREAD_START_ROUTINE,void*,HANDLE*,CLIENT_ID*);
|
||||
NTSYSAPI void WINAPI RtlDeactivateActivationContext(DWORD,ULONG_PTR);
|
||||
NTSYSAPI PVOID WINAPI RtlDecodePointer(PVOID);
|
||||
NTSYSAPI NTSTATUS WINAPI RtlDecompressBuffer(USHORT,PUCHAR,ULONG,PUCHAR,ULONG,PULONG);
|
||||
NTSYSAPI NTSTATUS WINAPI RtlDeleteAce(PACL,DWORD);
|
||||
NTSYSAPI NTSTATUS WINAPI RtlDeleteAtomFromAtomTable(RTL_ATOM_TABLE,RTL_ATOM);
|
||||
|
@ -2326,6 +2327,7 @@ NTSYSAPI NTSTATUS WINAPI RtlDowncaseUnicodeString(UNICODE_STRING*,const UNICODE
|
|||
NTSYSAPI void WINAPI RtlDumpResource(LPRTL_RWLOCK);
|
||||
NTSYSAPI NTSTATUS WINAPI RtlDuplicateUnicodeString(int,const UNICODE_STRING*,UNICODE_STRING*);
|
||||
NTSYSAPI NTSTATUS WINAPI RtlEmptyAtomTable(RTL_ATOM_TABLE,BOOLEAN);
|
||||
NTSYSAPI PVOID WINAPI RtlEncodePointer(PVOID);
|
||||
NTSYSAPI NTSTATUS WINAPI RtlEnterCriticalSection(RTL_CRITICAL_SECTION *);
|
||||
NTSYSAPI void WINAPI RtlEraseUnicodeString(UNICODE_STRING*);
|
||||
NTSYSAPI NTSTATUS WINAPI RtlEqualComputerName(const UNICODE_STRING*,const UNICODE_STRING*);
|
||||
|
|
Loading…
Reference in New Issue