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:
mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(c,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<c.getCenterX()&&(l=-1*(l+1)),new mxPoint(c.getCenterX()+l,Math.min(c.y+c.height,Math.max(c.y,q.y)));q.y<c.getCenterY()&&(l=-1*(l+1));return new mxPoint(Math.min(c.x+
c.width,Math.max(c.x,q.x)),c.getCenterY()+l)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(c,h,q,l){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(c,new mxRectangle(0,0,0,Math.max(0,Math.min(c.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(c,