fix infinite loop in KeRosDumpStackFrames()
authorRoyce Mitchell III <royce3@ev1.net>
Tue, 14 Dec 2004 03:46:10 +0000 (03:46 +0000)
committerRoyce Mitchell III <royce3@ev1.net>
Tue, 14 Dec 2004 03:46:10 +0000 (03:46 +0000)
svn path=/trunk/; revision=12108

reactos/ntoskrnl/ke/i386/exp.c

index 4c8f660..ce154ab 100644 (file)
@@ -659,13 +659,14 @@ KeRosDumpStackFrames ( PULONG Frame, ULONG FrameCount )
        }
        while ( MmIsAddressValid(Frame) && i++ < FrameCount )
        {
-               if (!KeRosPrintAddress((PVOID)Frame[1]))
+               ULONG Addr = Frame[1];
+               if (!KeRosPrintAddress((PVOID)Addr))
                {
-                       DbgPrint("<%X>", (PVOID)Frame[1]);
+                       DbgPrint("<%X>", Addr);
                }
-               if (Frame[1] == 0xdeadbeef)
+               if ( Addr == 0 || Addr == 0xDEADBEEF )
                {
-                   break;
+                       break;
                }
                Frame = (PULONG)Frame[0];
                DbgPrint(" ");