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:
39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},u=g.getFunction;mxKeyHandler.prototype.getFunction=function(x){if(e.isEnabled()){if(mxEvent.isShiftDown(x)&&mxEvent.isAltDown(x)){var A=f.actions.get(f.altShiftActions[x.keyCode]);if(null!=A)return A.funct}if(null!=n[x.keyCode]&&!e.isSelectionEmpty())if(!this.isControlDown(x)&&mxEvent.isShiftDown(x)&&mxEvent.isAltDown(x)){if(e.model.isVertex(e.getSelectionCell()))return function(){var C=e.connectVertex(e.getSelectionCell(),n[x.keyCode],
e.defaultEdgeLength,x,!0);null!=C&&0<C.length&&(1==C.length&&e.model.isEdge(C[0])?e.setSelectionCell(e.model.getTerminal(C[0],!1)):e.setSelectionCell(C[C.length-1]),e.scrollCellToVisible(e.getSelectionCell()),null!=f.hoverIcons&&f.hoverIcons.update(e.view.getState(e.getSelectionCell())))}}else return this.isControlDown(x)?function(){c(x.keyCode,mxEvent.isShiftDown(x)?e.gridSize:null,!0)}:function(){c(x.keyCode,mxEvent.isShiftDown(x)?e.gridSize:null)}}return u.apply(this,arguments)};g.bindAction=mxUtils.bind(this,