- 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:
Thomas Faber 2011-12-24 22:45:26 +00:00
parent 42942c9fbe
commit aa885e24d7

View file

@ -669,6 +669,7 @@ RtlpFindAndCommitPages(PHEAP Heap,
while (!(LastEntry->Flags & HEAP_ENTRY_LAST_ENTRY)) while (!(LastEntry->Flags & HEAP_ENTRY_LAST_ENTRY))
{ {
ASSERT(LastEntry->Size != 0);
LastEntry += LastEntry->Size; LastEntry += LastEntry->Size;
} }
ASSERT((LastEntry + LastEntry->Size) == FirstEntry); ASSERT((LastEntry + LastEntry->Size) == FirstEntry);