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:
Menus.prototype.addPopupMenuCellItems=function(a,c,f){var e=this.editorUi.editor.graph,g=e.view.getState(c);a.addSeparator();if(null!=g){var d=!1;1==e.getSelectionCount()&&e.getModel().isEdge(c)&&(a.addSeparator(),this.addSubmenu("line",a));if(e.getModel().isEdge(c)&&"entityRelationEdgeStyle"!=mxUtils.getValue(g.style,mxConstants.STYLE_EDGE,null)&&"arrow"!=mxUtils.getValue(g.style,mxConstants.STYLE_SHAPE,null)){g=e.selectionCellsHandler.getHandler(c);var k=!1;g instanceof mxEdgeHandler&&null!=g.bends&&
2<g.bends.length&&(d=g.getHandleForEvent(e.updateMouseEvent(new mxMouseEvent(f))),0<d&&d<g.bends.length-1&&(null==g.bends[d]||null==g.bends[d].node||""==g.bends[d].node.style.opacity)&&(k=this.editorUi.actions.get("removeWaypoint"),k.handler=g,k.index=d,k=!0));a.addSeparator();this.addMenuItem(a,"turn",null,f,null,mxResources.get("reverse"));this.addMenuItems(a,[k?"removeWaypoint":"addWaypoint"],null,f);g=e.getModel().getGeometry(c);d=null!=g&&null!=g.points&&0<g.points.length}1==e.getSelectionCount()&&
(d||e.getModel().isVertex(c)&&0<e.getModel().getEdgeCount(c))&&this.addMenuItems(a,["-","clearWaypoints"],null,f);1==e.getSelectionCount()&&e.isCellEditable(c)&&this.addPopupMenuCellEditItems(a,c,f)}};