Author: sir_richard
Date: Tue Oct 19 17:39:22 2010
New Revision: 49208
URL:
http://svn.reactos.org/svn/reactos?rev=49208&view=rev
Log:
[NTOS]: C Pointer Math will bite even the most experienced programmer in the ass. Fix
wrong calculation which led to ASSERTs and memory corruption (since the last revision).
Modified:
trunk/reactos/ntoskrnl/mm/ARM3/miarm.h
Modified: trunk/reactos/ntoskrnl/mm/ARM3/miarm.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/miarm.h?r…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/ARM3/miarm.h [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/ARM3/miarm.h [iso-8859-1] Tue Oct 19 17:39:22 2010
@@ -843,7 +843,7 @@
PMMPTE ProtoPte;
/* Find the offset within the VAD's prototype PTEs */
- ProtoPte = Vad->FirstPrototypePte + ((Vpn - Vad->StartingVpn) *
sizeof(MMPTE));
+ ProtoPte = Vad->FirstPrototypePte + (Vpn - Vad->StartingVpn);
ASSERT(ProtoPte <= Vad->LastContiguousPte);
return ProtoPte;
}