git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34780
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
#if wxUSE_DBGHELP
+// ----------------------------------------------------------------------------
+// constants
+// ----------------------------------------------------------------------------
+
+// to prevent recursion which could result from corrupted data we limit
+// ourselves to that many levels of embedded fields inside structs
+static const unsigned MAX_DUMP_DEPTH = 20;
+
// ----------------------------------------------------------------------------
// globals
// ----------------------------------------------------------------------------
wxString s;
// avoid infinite recursion
- if ( level > 100 )
+ if ( level > MAX_DUMP_DEPTH )
{
return s;
}