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:
mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(b,h,q,l){l=parseFloat(h.style[mxConstants.STYLE_STROKEWIDTH]||1)*h.view.scale/2-1;null!=h.style.backboneSize&&(l+=parseFloat(h.style.backboneSize)*h.view.scale/2-1);if("south"==h.style[mxConstants.STYLE_DIRECTION]||"north"==h.style[mxConstants.STYLE_DIRECTION])return q.x<b.getCenterX()&&(l=-1*(l+1)),new mxPoint(b.getCenterX()+l,Math.min(b.y+b.height,Math.max(b.y,q.y)));q.y<b.getCenterY()&&(l=-1*(l+1));return new mxPoint(Math.min(b.x+
b.width,Math.max(b.x,q.x)),b.getCenterY()+l)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(b,h,q,l){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(b,new mxRectangle(0,0,0,Math.max(0,Math.min(b.height,parseFloat(mxUtils.getValue(h.style,"size",ba.prototype.size))*h.view.scale))),h.style),h,q,l)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(b,