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