https://git.reactos.org/?p=reactos.git;a=commitdiff;h=3410b25fdeb06991fe8b5…
commit 3410b25fdeb06991fe8b56cc601d49cb943fe1ad
Author: Timo Kreuzer <timo.kreuzer(a)reactos.org>
AuthorDate: Sat Jan 19 13:38:24 2019 +0100
Commit: Timo Kreuzer <timo.kreuzer(a)reactos.org>
CommitDate: Sat Jan 19 13:38:24 2019 +0100
[NTOS] Turn broken assert into DPRINT
---
ntoskrnl/mm/ARM3/sysldr.c | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/ntoskrnl/mm/ARM3/sysldr.c b/ntoskrnl/mm/ARM3/sysldr.c
index 107f3fcf40..ffab764ae2 100644
--- a/ntoskrnl/mm/ARM3/sysldr.c
+++ b/ntoskrnl/mm/ARM3/sysldr.c
@@ -2389,7 +2389,7 @@ MiWriteProtectSystemImage(
PMMPTE FirstPte, LastPte;
/* Check if the registry setting is on or not */
- if (!MmEnforceWriteProtection)
+ if (MmEnforceWriteProtection)
{
/* Ignore section protection */
return;
@@ -2479,8 +2479,17 @@ MiWriteProtectSystemImage(
}
/* Image should end with the last section */
- NT_ASSERT(ALIGN_UP_POINTER_BY(SectionEnd, PAGE_SIZE) ==
- Add2Ptr(ImageBase, NtHeaders->OptionalHeader.SizeOfImage));
+ if (ALIGN_UP_POINTER_BY(SectionEnd, PAGE_SIZE) !=
+ Add2Ptr(ImageBase, NtHeaders->OptionalHeader.SizeOfImage))
+ {
+ DPRINT1("ImageBase 0x%p ImageSize 0x%lx Section %u VA 0x%lx Raw 0x%lx virt
0x%lx\n",
+ ImageBase,
+ NtHeaders->OptionalHeader.SizeOfImage,
+ i,
+ Section->VirtualAddress,
+ Section->SizeOfRawData,
+ Section->Misc.VirtualSize);
+ }
}
VOID