Author: fireball
Date: Mon Oct 6 05:50:22 2008
New Revision: 36663
URL:
http://svn.reactos.org/svn/reactos?rev=36663&view=rev
Log:
Cecill Etheredge <ijsf(a)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.
Modified:
trunk/reactos/lib/rtl/generictable.c
trunk/reactos/lib/rtl/splaytree.c
Modified: trunk/reactos/lib/rtl/generictable.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/generictable.c?rev…
==============================================================================
--- trunk/reactos/lib/rtl/generictable.c [iso-8859-1] (original)
+++ trunk/reactos/lib/rtl/generictable.c [iso-8859-1] Mon Oct 6 05:50:22 2008
@@ -390,7 +390,7 @@
else
{
/* Otherwise, try using the real successor */
- FoundNode = RtlRealSuccessor(Table->TableRoot);
+ FoundNode = RtlRealSuccessor(*RestartKey);
if (FoundNode) *RestartKey = FoundNode;
}
Modified: trunk/reactos/lib/rtl/splaytree.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/splaytree.c?rev=36…
==============================================================================
--- trunk/reactos/lib/rtl/splaytree.c [iso-8859-1] (original)
+++ trunk/reactos/lib/rtl/splaytree.c [iso-8859-1] Mon Oct 6 05:50:22 2008
@@ -40,7 +40,7 @@
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);