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(b,e,k,n){function D(q){if(null!=E){var y=new mxPoint(mxEvent.getClientX(q),mxEvent.getClientY(q));n(Math.max(0,d+(e?y.x-E.x:E.y-y.y)-k));mxEvent.consume(q);d!=m()&&(f=!0,g=null)}}function t(q){D(q);E=d=null}var E=null,d=null,f=!0,g=null;mxClient.IS_POINTER&&(b.style.touchAction="none");var m=mxUtils.bind(this,function(){var q=parseInt(e?b.style.left:b.style.bottom);e||(q=q+k-this.footerHeight);return q});mxEvent.addGestureListeners(b,function(q){E=new mxPoint(mxEvent.getClientX(q),