stop after at most 200 iterations in WalkFrom() to avoid looping endlessly when the stack is corrupted (patch 1759239)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@47767 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -266,8 +266,9 @@ void wxStackWalker::WalkFrom(const CONTEXT *pCtx, size_t skip)
|
||||
#error "Need to initialize STACKFRAME on non x86"
|
||||
#endif // _M_IX86
|
||||
|
||||
// iterate over all stack frames
|
||||
for ( size_t nLevel = 0; ; nLevel++ )
|
||||
// iterate over all stack frames (but stop after 200 to avoid entering
|
||||
// infinite loop if the stack is corrupted)
|
||||
for ( size_t nLevel = 0; nLevel < 200; nLevel++ )
|
||||
{
|
||||
// get the next stack frame
|
||||
if ( !wxDbgHelpDLL::StackWalk
|
||||
|
Reference in New Issue
Block a user