mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-27 03:43:36 +00:00
[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).
svn path=/trunk/; revision=49208
This commit is contained in:
@@ -843,7 +843,7 @@ MI_GET_PROTOTYPE_PTE_FOR_VPN(IN PMMVAD Vad,
|
||||
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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user