[ros-diffs] [jgardou] 53482: [KERNEL32] - do not access memory that might have been freed
jgardou at svn.reactos.org
jgardou at svn.reactos.org
Sun Aug 28 17:30:26 UTC 2011
Author: jgardou
Date: Sun Aug 28 17:30:25 2011
New Revision: 53482
URL: http://svn.reactos.org/svn/reactos?rev=53482&view=rev
Log:
[KERNEL32]
- do not access memory that might have been freed
Modified:
trunk/reactos/dll/win32/kernel32/client/debugger.c
Modified: trunk/reactos/dll/win32/kernel32/client/debugger.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/client/debugger.c?rev=53482&r1=53481&r2=53482&view=diff
==============================================================================
--- trunk/reactos/dll/win32/kernel32/client/debugger.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/client/debugger.c [iso-8859-1] Sun Aug 28 17:30:25 2011
@@ -305,7 +305,8 @@
/* Loop all thread data events */
ThreadData = (PDBGSS_THREAD_DATA*)NtCurrentTeb()->DbgSsReserved;
- for (ThisData = *ThreadData; ThisData; ThisData = ThisData->Next)
+ ThisData = *ThreadData;
+ while(ThisData)
{
/* Check if this one matches */
if ((ThisData->HandleMarked) &&
@@ -326,6 +327,7 @@
/* Move to the next one */
ThreadData = &ThisData->Next;
}
+ ThisData = *ThreadData;
}
}
@@ -338,7 +340,8 @@
/* Loop all thread data events */
ThreadData = (PDBGSS_THREAD_DATA*)NtCurrentTeb()->DbgSsReserved;
- for (ThisData = *ThreadData; ThisData; ThisData = ThisData->Next)
+ ThisData = *ThreadData;
+ while(ThisData)
{
/* Check if this one matches */
if (ThisData->ProcessId == dwProcessId)
@@ -358,6 +361,7 @@
/* Move to the next one */
ThreadData = &ThisData->Next;
}
+ ThisData = *ThreadData;
}
}
More information about the Ros-diffs
mailing list