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:
Toolbar.prototype.addClickHandler=function(a,c){null!=c&&(mxEvent.addListener(a,"click",function(f){a.enabled&&c(f);mxEvent.consume(f)}),mxEvent.addListener(a,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(f){f.preventDefault()})))};Toolbar.prototype.createButton=function(a){var c=document.createElement("a");c.className="geButton";var f=document.createElement("div");null!=a&&(f.className="geSprite "+a);c.appendChild(f);return c};