mirror of
https://github.com/reactos/reactos.git
synced 2025-04-19 20:19:26 +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:
parent
3e8034d4a5
commit
ef6bc56d6f
1 changed files with 1 additions and 1 deletions
|
@ -843,7 +843,7 @@ MI_GET_PROTOTYPE_PTE_FOR_VPN(IN PMMVAD Vad,
|
||||||
PMMPTE ProtoPte;
|
PMMPTE ProtoPte;
|
||||||
|
|
||||||
/* Find the offset within the VAD's prototype PTEs */
|
/* 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);
|
ASSERT(ProtoPte <= Vad->LastContiguousPte);
|
||||||
return ProtoPte;
|
return ProtoPte;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue