https://git.reactos.org/?p=reactos.git;a=commitdiff;h=3ba51dc21894bd5c2d157…
commit 3ba51dc21894bd5c2d1574af1db5094ab4e3d6ae
Author: Andrew Boyarshin <andrew.boyarshin(a)gmail.com>
AuthorDate: Wed Dec 12 18:12:24 2018 +0700
Commit: Pierre Schweitzer <pierre(a)reactos.org>
CommitDate: Wed Dec 12 12:57:08 2018 +0100
[NTOS:MM] Fix typo in MiCheckForUserStackOverflow
---
ntoskrnl/mm/ARM3/pagfault.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/ntoskrnl/mm/ARM3/pagfault.c b/ntoskrnl/mm/ARM3/pagfault.c
index 77aaf754df..de642510df 100644
--- a/ntoskrnl/mm/ARM3/pagfault.c
+++ b/ntoskrnl/mm/ARM3/pagfault.c
@@ -33,7 +33,7 @@ MiCheckForUserStackOverflow(IN PVOID Address,
PETHREAD CurrentThread = PsGetCurrentThread();
PTEB Teb = CurrentThread->Tcb.Teb;
PVOID StackBase, DeallocationStack, NextStackAddress;
- SIZE_T GuranteedSize;
+ SIZE_T GuaranteedSize;
NTSTATUS Status;
/* Do we own the address space lock? */
@@ -56,15 +56,15 @@ MiCheckForUserStackOverflow(IN PVOID Address,
/* Read the current settings */
StackBase = Teb->NtTib.StackBase;
DeallocationStack = Teb->DeallocationStack;
- GuranteedSize = Teb->GuaranteedStackBytes;
+ GuaranteedSize = Teb->GuaranteedStackBytes;
DPRINT("Handling guard page fault with Stacks Addresses 0x%p and 0x%p,
guarantee: %lx\n",
- StackBase, DeallocationStack, GuranteedSize);
+ StackBase, DeallocationStack, GuaranteedSize);
/* Guarantees make this code harder, for now, assume there aren't any */
- ASSERT(GuranteedSize == 0);
+ ASSERT(GuaranteedSize == 0);
/* So allocate only the minimum guard page size */
- GuranteedSize = PAGE_SIZE;
+ GuaranteedSize = PAGE_SIZE;
/* Does this faulting stack address actually exist in the stack? */
if ((Address >= StackBase) || (Address < DeallocationStack))
@@ -76,7 +76,7 @@ MiCheckForUserStackOverflow(IN PVOID Address,
}
/* This is where the stack will start now */
- NextStackAddress = (PVOID)((ULONG_PTR)PAGE_ALIGN(Address) - GuranteedSize);
+ NextStackAddress = (PVOID)((ULONG_PTR)PAGE_ALIGN(Address) - GuaranteedSize);
/* Do we have at least one page between here and the end of the stack? */
if (((ULONG_PTR)NextStackAddress - PAGE_SIZE) <= (ULONG_PTR)DeallocationStack)
@@ -85,13 +85,13 @@ MiCheckForUserStackOverflow(IN PVOID Address,
DPRINT1("Close to our death...\n");
/* Calculate the next memory address */
- NextStackAddress = (PVOID)((ULONG_PTR)PAGE_ALIGN(DeallocationStack) +
GuranteedSize);
+ NextStackAddress = (PVOID)((ULONG_PTR)PAGE_ALIGN(DeallocationStack) +
GuaranteedSize);
/* Allocate the memory */
Status = ZwAllocateVirtualMemory(NtCurrentProcess(),
&NextStackAddress,
0,
- &GuranteedSize,
+ &GuaranteedSize,
MEM_COMMIT,
PAGE_READWRITE);
if (NT_SUCCESS(Status))
@@ -111,13 +111,13 @@ MiCheckForUserStackOverflow(IN PVOID Address,
ASSERT((PsGetCurrentProcess()->Peb->NtGlobalFlag &
FLG_DISABLE_STACK_EXTENSION) == 0);
/* Update the stack limit */
- Teb->NtTib.StackLimit = (PVOID)((ULONG_PTR)NextStackAddress + GuranteedSize);
+ Teb->NtTib.StackLimit = (PVOID)((ULONG_PTR)NextStackAddress + GuaranteedSize);
/* Now move the guard page to the next page */
Status = ZwAllocateVirtualMemory(NtCurrentProcess(),
&NextStackAddress,
0,
- &GuranteedSize,
+ &GuaranteedSize,
MEM_COMMIT,
PAGE_READWRITE | PAGE_GUARD);
if ((NT_SUCCESS(Status) || (Status == STATUS_ALREADY_COMMITTED)))