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.updateSelectionStateForCell=function(a,c,f,e){f=this.editor.graph;a.cells.push(c);if(f.getModel().isVertex(c)){a.connections=0<f.model.getEdgeCount(c);a.unlocked=a.unlocked&&!f.isCellLocked(c);a.resizable=a.resizable&&f.isCellResizable(c);a.rotatable=a.rotatable&&f.isCellRotatable(c);a.movable=a.movable&&f.isCellMovable(c)&&!f.isTableRow(c)&&!f.isTableCell(c);a.swimlane=a.swimlane||f.isSwimlane(c);a.table=a.table||f.isTable(c);a.cell=a.cell||f.isTableCell(c);a.row=a.row||f.isTableRow(c);
a.vertices.push(c);var g=f.getCellGeometry(c);if(null!=g&&(0<g.width?null==a.width?a.width=g.width:a.width!=g.width&&(a.width=""):a.containsLabel=!0,0<g.height?null==a.height?a.height=g.height:a.height!=g.height&&(a.height=""):a.containsLabel=!0,!g.relative||null!=g.offset)){var d=g.relative?g.offset.x:g.x;g=g.relative?g.offset.y:g.y;null==a.x?a.x=d:a.x!=d&&(a.x="");null==a.y?a.y=g:a.y!=g&&(a.y="")}}else f.getModel().isEdge(c)&&(a.edges.push(c),a.connections=!0,a.resizable=!1,a.rotatable=!1,a.movable=
!1);c=f.view.getState(c);null!=c&&(a.autoSize=a.autoSize||f.isAutoSizeState(c),a.glass=a.glass&&f.isGlassState(c),a.rounded=a.rounded&&f.isRoundedState(c),a.lineJumps=a.lineJumps&&f.isLineJumpState(c),a.image=a.image&&f.isImageState(c),a.shadow=a.shadow&&f.isShadowState(c),a.fill=a.fill&&f.isFillState(c),a.stroke=a.stroke&&f.isStrokeState(c),d=mxUtils.getValue(c.style,mxConstants.STYLE_SHAPE,null),a.containsImage=a.containsImage||"image"==d,f.mergeStyle(c.style,a.style,e))};