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:
new mxPoint(q.getCenterX(),q.getCenterY()):E.apply(this,arguments)};var d=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(m,q,y,F){if(null==q||null==m||"1"!=q.style.snapToPoint&&"1"!=m.style.snapToPoint)d.apply(this,arguments);else{q=this.getTerminalPort(m,q,F);var C=this.getNextPoint(m,y,F),H=this.graph.isOrthogonal(m),G=mxUtils.toRadians(Number(q.style[mxConstants.STYLE_ROTATION]||"0")),aa=new mxPoint(q.getCenterX(),q.getCenterY());if(0!=
G){var da=Math.cos(-G),ba=Math.sin(-G);C=mxUtils.getRotatedPoint(C,da,ba,aa)}da=parseFloat(m.style[mxConstants.STYLE_PERIMETER_SPACING]||0);da+=parseFloat(m.style[F?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);C=this.getPerimeterPoint(q,C,0==G&&H,da);0!=G&&(da=Math.cos(G),ba=Math.sin(G),C=mxUtils.getRotatedPoint(C,da,ba,aa));m.setAbsoluteTerminalPoint(this.snapToAnchorPoint(m,q,y,F,C),F)}};mxGraphView.prototype.snapToAnchorPoint=function(m,q,y,F,C){if(null!=