Author: fireball
Date: Tue Oct 9 21:00:11 2007
New Revision: 29471
URL:
http://svn.reactos.org/svn/reactos?rev=29471&view=rev
Log:
Mike Nordell <tamlin>
- Add two checks for infinite loops. The latter gets triggered in some cases, a memory
overwrite is suspected, or a race condition.
Modified:
trunk/reactos/ntoskrnl/cm/registry.c
Modified: trunk/reactos/ntoskrnl/cm/registry.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/cm/registry.c?rev…
==============================================================================
--- trunk/reactos/ntoskrnl/cm/registry.c (original)
+++ trunk/reactos/ntoskrnl/cm/registry.c Tue Oct 9 21:00:11 2007
@@ -97,11 +97,21 @@
!(CurrentKey->Flags & KO_MARKED_FOR_DELETE))
{
ObDereferenceObject(CurrentKey);
+ if (CurrentEntry == CmiKeyObjectListHead.Blink)
+ {
+ DPRINT("Registry loop detected! Crashing\n");
+ KEBUGCHECK(0);
+ }
CurrentEntry = CmiKeyObjectListHead.Blink;
Count++;
}
else
{
+ if (CurrentEntry == CurrentEntry->Blink)
+ {
+ DPRINT("Registry loop detected! Crashing\n");
+ KEBUGCHECK(0);
+ }
CurrentEntry = CurrentEntry->Blink;
}
}