From: Vadim Zeitlin Date: Thu, 5 May 2005 20:15:35 +0000 (+0000) Subject: limit recursion depth in DumpUDT() to prevent crashes when dumping linked lists X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/737c443bd16aa48366e941b886e6a3e8630bab85 limit recursion depth in DumpUDT() to prevent crashes when dumping linked lists git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33962 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/msw/debughlp.cpp b/src/msw/debughlp.cpp index 5f5e75037e..3752aa10b2 100644 --- a/src/msw/debughlp.cpp +++ b/src/msw/debughlp.cpp @@ -373,6 +373,13 @@ wxDbgHelpDLL::DumpField(PSYMBOL_INFO pSym, void *pVariable, unsigned level) wxDbgHelpDLL::DumpUDT(PSYMBOL_INFO pSym, void *pVariable, unsigned level) { wxString s; + + // we have to limit the depth of UDT dumping as otherwise we get in + // infinite loops trying to dump linked lists... 10 levels seems quite + // reasonable, full information is in minidump file anyhow + if ( level > 10 ) + return s; + s.reserve(512); s = GetSymbolName(pSym);