From e6fe154eef1a77c5f51ca22a97a9499166a2d4d6 Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Thu, 1 Sep 2011 18:55:12 +0000 Subject: [PATCH] [NTOSKRNL] Fix condition check for informing the debugger in NtMapViewOfSection Found by Amine Khaldi svn path=/trunk/; revision=53525 --- reactos/ntoskrnl/mm/ARM3/section.c | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/reactos/ntoskrnl/mm/ARM3/section.c b/reactos/ntoskrnl/mm/ARM3/section.c index af122899a76..5af22884f57 100644 --- a/reactos/ntoskrnl/mm/ARM3/section.c +++ b/reactos/ntoskrnl/mm/ARM3/section.c @@ -1679,22 +1679,21 @@ NtMapViewOfSection(IN HANDLE SectionHandle, AllocationType, Protect); - /* Check if this is an image for the current process */ - if ((Section->AllocationAttributes & SEC_IMAGE) && - (Process == PsGetCurrentProcess()) && - ((Status != STATUS_IMAGE_NOT_AT_BASE) || - (Status != STATUS_CONFLICTING_ADDRESSES))) - { - /* Notify the debugger */ - DbgkMapViewOfSection(Section, - SafeBaseAddress, - SafeSectionOffset.LowPart, - SafeViewSize); - } - /* Return data only on success */ if (NT_SUCCESS(Status)) { + /* Check if this is an image for the current process */ + if ((Section->AllocationAttributes & SEC_IMAGE) && + (Process == PsGetCurrentProcess()) && + (Status != STATUS_IMAGE_NOT_AT_BASE)) + { + /* Notify the debugger */ + DbgkMapViewOfSection(Section, + SafeBaseAddress, + SafeSectionOffset.LowPart, + SafeViewSize); + } + /* Enter SEH */ _SEH2_TRY {