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:
y,J+Y),new mxPoint(w,J+Y-p),new mxPoint(w,J)]):(p=p?Math.max(0,Math.min(.5*y,v)):y*Math.max(0,Math.min(1,v)),J=[new mxPoint(w+p,J),new mxPoint(w+y,J),new mxPoint(w+y-p,J+Y),new mxPoint(w,J+Y),new mxPoint(w+p,J)]);Y=b.getCenterX();b=b.getCenterY();b=new mxPoint(Y,b);l&&(q.x<w||q.x>w+y?b.y=q.y:b.x=q.x);return mxUtils.getPerimeterPoint(J,b,q)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(b,h,q,l){var p="0"!=mxUtils.getValue(h.style,
"fixedSize","0"),v=p?P.prototype.fixedSize:P.prototype.size;null!=h&&(v=mxUtils.getValue(h.style,"size",v));p&&(v*=h.view.scale);var w=b.x,J=b.y,y=b.width,Y=b.height;h=null!=h?mxUtils.getValue(h.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;h==mxConstants.DIRECTION_EAST?(p=p?Math.max(0,Math.min(.5*y,v)):y*Math.max(0,Math.min(1,v)),J=[new mxPoint(w+p,J),new mxPoint(w+y-p,J),new mxPoint(w+y,J+Y),new mxPoint(w,J+Y),new mxPoint(w+p,J)]):h==mxConstants.DIRECTION_WEST?
(p=p?Math.max(0,Math.min(y,v)):y*Math.max(0,Math.min(1,v)),J=[new mxPoint(w,J),new mxPoint(w+y,J),new mxPoint(w+y-p,J+Y),new mxPoint(w+p,J+Y),new mxPoint(w,J)]):h==mxConstants.DIRECTION_NORTH?(p=p?Math.max(0,Math.min(Y,v)):Y*Math.max(0,Math.min(1,v)),J=[new mxPoint(w,J+p),new mxPoint(w+y,J),new mxPoint(w+y,J+Y),new mxPoint(w,J+Y-p),new mxPoint(w,J+p)]):(p=p?Math.max(0,Math.min(Y,v)):Y*Math.max(0,Math.min(1,v)),J=[new mxPoint(w,J),new mxPoint(w+y,J+p),new mxPoint(w+y,J+Y-p),new mxPoint(w,J+Y),new mxPoint(w,
J)]);Y=b.getCenterX();b=b.getCenterY();b=new mxPoint(Y,b);l&&(q.x<w||q.x>w+y?b.y=q.y:b.x=q.x);return mxUtils.getPerimeterPoint(J,b,q)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(b,h,q,l){var p="0"!=mxUtils.getValue(h.style,"fixedSize","0"),v=p?qa.prototype.fixedSize:qa.prototype.size;null!=h&&(v=mxUtils.getValue(h.style,"size",v));p&&(v*=h.view.scale);var w=b.x,J=b.y,y=b.width,Y=b.height,N=b.getCenterX();b=b.getCenterY();h=null!=