Language: JavaScript
Label: vulnerable
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:
	EditorUi.prototype.executeLayoutList = function(layoutList, done)
	{
		var graph = this.editor.graph;
		var cells = graph.getSelectionCells();

		for (var i = 0; i < layoutList.length; i++)
		{
			var layout = new window[layoutList[i].layout](graph);
			
			if (layoutList[i].config != null)
			{
				for (var key in layoutList[i].config)
				{
					layout[key] = layoutList[i].config[key];
				}
			}
			
			this.executeLayout(function()
			{
				layout.execute(graph.getDefaultParent(), cells.length == 0 ? null : cells);
			}, i == layoutList.length - 1, done);
		}
	};