mirror of
https://github.com/reactos/reactos.git
synced 2024-07-02 18:54:25 +00:00
[RTL]
- ASSERT on damaged heap data structures instead of producing an infinite loop See issue #5857 for more details. svn path=/trunk/; revision=54749
This commit is contained in:
parent
42942c9fbe
commit
aa885e24d7
|
@ -669,6 +669,7 @@ RtlpFindAndCommitPages(PHEAP Heap,
|
|||
|
||||
while (!(LastEntry->Flags & HEAP_ENTRY_LAST_ENTRY))
|
||||
{
|
||||
ASSERT(LastEntry->Size != 0);
|
||||
LastEntry += LastEntry->Size;
|
||||
}
|
||||
ASSERT((LastEntry + LastEntry->Size) == FirstEntry);
|
||||
|
@ -683,7 +684,7 @@ RtlpFindAndCommitPages(PHEAP Heap,
|
|||
DPRINT("Updating UcrDescriptor %p, new Address %p, size %d\n",
|
||||
UcrDescriptor, UcrDescriptor->Address, UcrDescriptor->Size);
|
||||
|
||||
/* Set various first entry fields*/
|
||||
/* Set various first entry fields */
|
||||
FirstEntry->SegmentOffset = LastEntry->SegmentOffset;
|
||||
FirstEntry->Size = (USHORT)(*Size >> HEAP_ENTRY_SHIFT);
|
||||
FirstEntry->PreviousSize = LastEntry->Size;
|
||||
|
|
Loading…
Reference in a new issue