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:
d.executeLayouts(u.createLayouts(A));d.customLayoutConfig=A;d.hideDialog()}catch(B){d.handleError(B)}},null,null,null,null,null,!0,null,null,"https://www.diagrams.net/doc/faq/apply-layouts");d.showDialog(q.container,620,460,!0,!0);q.init()});k=this.get("layout");var x=k.funct;k.funct=function(q,E){x.apply(this,arguments);q.addItem(mxResources.get("orgChart"),null,function(){function A(){"undefined"!==typeof mxOrgChartLayout||d.loadingOrgChart||d.isOffline(!0)?F():d.spinner.spin(document.body,mxResources.get("loading"))&&
(d.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 B=null,G=20,M=20,H=!0,F=function(){d.loadingOrgChart=!1;d.spinner.stop();if("undefined"!==typeof mxOrgChartLayout&&null!=B&&H){var n=d.editor.graph,C=new mxOrgChartLayout(n,B,G,M),J=n.getDefaultParent();