Cecill Etheredge <ijsf@gmx.net>

- The RtlEnumerateGenericTableWithoutSplaying function in RTL (generictable.c) effectively performs an endless enumeration, never advancing to the next successor element in the tree because of a bug in the code. Fix this. (Bug #3756).
- The RtlDelete code misses a line of code checking whether the node is a root,
and instead always returns NULL (assuming it is the root). Fix this. (Bug #3760).
See issue #3760 for more details.

svn path=/trunk/; revision=36663
This commit is contained in:
Aleksey Bragin 2008-10-06 10:50:22 +00:00
parent ef393802e4
commit a7e1400f0c
2 changed files with 2 additions and 2 deletions

View file

@ -390,7 +390,7 @@ RtlEnumerateGenericTableWithoutSplaying(IN PRTL_GENERIC_TABLE Table,
else
{
/* Otherwise, try using the real successor */
FoundNode = RtlRealSuccessor(Table->TableRoot);
FoundNode = RtlRealSuccessor(*RestartKey);
if (FoundNode) *RestartKey = FoundNode;
}

View file

@ -40,7 +40,7 @@ RtlDelete(PRTL_SPLAY_LINKS Links)
if (!(RtlLeftChild(N)) && !(RtlRightChild(N)))
{
/* If we are also the root, then the tree is gone */
return NULL;
if (RtlIsRoot(N)) return NULL;
/* Get our parent */
P = RtlParent(N);