From fc10a5b0138464698c3b2b05d5274292d4a72160 Mon Sep 17 00:00:00 2001 From: David Welch Date: Sun, 27 Jul 2003 11:49:32 +0000 Subject: [PATCH] - Don't continue the exception if there are no seh frames at all. svn path=/trunk/; revision=5286 --- reactos/ntoskrnl/rtl/i386/exception.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/reactos/ntoskrnl/rtl/i386/exception.c b/reactos/ntoskrnl/rtl/i386/exception.c index 6141489906c..af720cf2751 100755 --- a/reactos/ntoskrnl/rtl/i386/exception.c +++ b/reactos/ntoskrnl/rtl/i386/exception.c @@ -1,4 +1,4 @@ -/* $Id: exception.c,v 1.7 2003/07/11 01:23:16 royce Exp $ +/* $Id: exception.c,v 1.8 2003/07/27 11:49:32 dwelch Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -164,6 +164,13 @@ RtlpDispatchException(IN PEXCEPTION_RECORD ExceptionRecord, DPRINT("RegistrationFrame is 0x%X\n", RegistrationFrame); + /* Check if there are any exception handlers at all. */ + if ((ULONG_PTR)RegistrationFrame == (ULONG_PTR)-1) + { + ExceptionRecord->ExceptionFlags |= EXCEPTION_NONCONTINUABLE; + return ExceptionContinueExecution; + } + while ((ULONG_PTR)RegistrationFrame != (ULONG_PTR)-1) { EXCEPTION_RECORD ExceptionRecord2; @@ -273,9 +280,9 @@ RtlpDispatchException(IN PEXCEPTION_RECORD ExceptionRecord, ExceptionRecord->ExceptionFlags |= EXCEPTION_EXIT_UNWIND; if (DispatcherContext > Temp) - { + { Temp = DispatcherContext; - } + } } else /* if (ReturnValue == ExceptionCollidedUnwind) */ {