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:
GraphViewer.prototype.addToolbar=function(){function b(ea,ka,ja,U){var I=document.createElement("div");I.style.borderRight="1px solid #d0d0d0";I.style.padding="3px 6px 3px 6px";mxEvent.addListener(I,"click",ea);null!=ja&&I.setAttribute("title",ja);I.style.display="inline-block";ea=document.createElement("img");ea.setAttribute("border","0");ea.setAttribute("src",ka);ea.style.width="18px";null==U||U?(mxEvent.addListener(I,"mouseenter",function(){I.style.backgroundColor="#ddd"}),mxEvent.addListener(I,
"mouseleave",function(){I.style.backgroundColor="#eee"}),mxUtils.setOpacity(ea,60),I.style.cursor="pointer"):mxUtils.setOpacity(I,30);I.appendChild(ea);k.appendChild(I);m++;return I}var e=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?e.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(e.style.marginTop=this.toolbarHeight+"px");var k=e.ownerDocument.createElement("div");k.style.position="absolute";k.style.overflow="hidden";k.style.boxSizing=