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:
Graph.prototype.createLayouts=function(b){for(var e=[],k=0;k<b.length;k++)if(0<=mxUtils.indexOf(Graph.layoutNames,b[k].layout)){var n=new window[b[k].layout](this);if(null!=b[k].config)for(var D in b[k].config)n[D]=b[k].config[D];e.push(n)}else throw Error(mxResources.get("invalidCallFnNotFound",[b[k].layout]));return e};