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:
EditorUi.prototype.addSplitHandler=function(a,b,f,e){function g(x){if(null!=k){var A=new mxPoint(mxEvent.getClientX(x),mxEvent.getClientY(x));e(Math.max(0,n+(b?A.x-k.x:k.y-A.y)-f));mxEvent.consume(x);n!=r()&&(u=!0,m=null)}}function d(x){g(x);k=n=null}var k=null,n=null,u=!0,m=null;mxClient.IS_POINTER&&(a.style.touchAction="none");var r=mxUtils.bind(this,function(){var x=parseInt(b?a.style.left:a.style.bottom);b||(x=x+f-this.footerHeight);return x});mxEvent.addGestureListeners(a,function(x){k=new mxPoint(mxEvent.getClientX(x),
mxEvent.getClientY(x));n=r();u=!1;mxEvent.consume(x)});mxEvent.addListener(a,"click",mxUtils.bind(this,function(x){if(!u&&this.hsplitClickEnabled){var A=null!=m?m-f:0;m=r();e(A);mxEvent.consume(x)}}));mxEvent.addGestureListeners(document,null,g,d);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,g,d)})};