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:
Graph.prototype.initLayoutManager=function(){this.layoutManager=new mxLayoutManager(this);this.layoutManager.hasLayout=function(a){return null!=this.graph.getCellStyle(a).childLayout};this.layoutManager.getLayout=function(a,c){var f=this.graph.model.getParent(a);if(!this.graph.isCellCollapsed(a)&&(c!=mxEvent.BEGIN_UPDATE||this.hasLayout(f,c))){a=this.graph.getCellStyle(a);if("stackLayout"==a.childLayout)return c=new mxStackLayout(this.graph,!0),c.resizeParentMax="1"==mxUtils.getValue(a,"resizeParentMax",