Language: JavaScript
Label: safe
CWE: CWE-400 \u2014 Uncontrolled Resource Consumption
The product does not properly control the allocation and maintenance of a limited resource, thereby enabling an actor to influence the amount of resources consumed, eventually leading to the exhaustion of available resources.

Code:
c.executeLayouts(m.createLayouts(B));c.customLayoutConfig=B;c.hideDialog()}catch(C){c.handleError(C)}},null,null,null,null,null,!0,null,null,"https://www.diagrams.net/doc/faq/apply-layouts");c.showDialog(u.container,620,460,!0,!0);u.init()});l=this.get("layout");var y=l.funct;l.funct=function(u,D){y.apply(this,arguments);u.addItem(mxResources.get("orgChart"),null,function(){function B(){"undefined"!==typeof mxOrgChartLayout||c.loadingOrgChart||c.isOffline(!0)?F():c.spinner.spin(document.body,mxResources.get("loading"))&&
(c.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",F)})})}):mxscript("js/extensions.min.js",F))}var C=null,G=20,N=20,I=!0,F=function(){c.loadingOrgChart=!1;c.spinner.stop();if("undefined"!==typeof mxOrgChartLayout&&null!=C&&I){var t=c.editor.graph,E=new mxOrgChartLayout(t,C,G,N),M=t.getDefaultParent();