ULONG Protection;
PVOID Base;
- // FIXME: Check this, when we should add up usersize and when we shouldn't!
- if (!(DphRoot->ExtraFlags & DPH_EXTRA_CHECK_UNDERRUN))
+ if (DphRoot->ExtraFlags & DPH_EXTRA_CHECK_UNDERRUN)
{
- Base = VirtualBlock;
+ Base = VirtualBlock + PAGE_SIZE;
}
else
{
- Base = VirtualBlock + PAGE_SIZE;
+ Base = VirtualBlock;
}
// FIXME: It should be different, but for now it's fine
NTSTATUS NTAPI
RtlpDphSetProtectionAfterUse(PDPH_HEAP_ROOT DphRoot, /*PUCHAR VirtualBlock*/PDPH_HEAP_BLOCK Node)
{
+ ASSERT((Node->nVirtualAccessSize + PAGE_SIZE) <= Node->nVirtualBlockSize);
+
// FIXME: Bring stuff here
if (DphRoot->ExtraFlags & DPH_EXTRA_CHECK_UNDERRUN)
{
if (!DphRoot) return NULL;
/* Acquire the heap lock */
- //RtlpDphEnterCriticalSection(DphRoot, Flags);
RtlpDphPreProcessing(DphRoot, Flags);
/* Perform internal validation if specified by flags */
}
/* Set new protection */
- RtlpDphSetProtectionAfterUse(DphRoot, Node);
+ //RtlpDphSetProtectionAfterUse(DphRoot, Node);
/* Remove it from the list of busy nodes */
RtlpDphRemoveFromBusyList(DphRoot, Node);