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:
var LinkDialog=function(a,c,f,e){var g=document.createElement("div");mxUtils.write(g,mxResources.get("editLink")+":");var d=document.createElement("div");d.className="geTitle";d.style.backgroundColor="transparent";d.style.borderColor="transparent";d.style.whiteSpace="nowrap";d.style.textOverflow="clip";d.style.cursor="default";d.style.paddingRight="20px";var k=document.createElement("input");k.setAttribute("value",c);k.setAttribute("placeholder","http://www.example.com/");k.setAttribute("type","text");
k.style.marginTop="6px";k.style.width="400px";k.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";k.style.backgroundRepeat="no-repeat";k.style.backgroundPosition="100% 50%";k.style.paddingRight="14px";c=document.createElement("div");c.setAttribute("title",mxResources.get("reset"));c.style.position="relative";c.style.left="-16px";c.style.width="12px";c.style.height="14px";c.style.cursor="pointer";c.style.display="inline-block";c.style.top="3px";c.style.background="url("+IMAGE_PATH+"/transparent.gif)";
mxEvent.addListener(c,"click",function(){k.value="";k.focus()});d.appendChild(k);d.appendChild(c);g.appendChild(d);this.init=function(){k.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?k.select():document.execCommand("selectAll",!1,null)};d=document.createElement("div");d.style.marginTop="18px";d.style.textAlign="right";mxEvent.addListener(k,"keypress",function(n){13==n.keyCode&&(a.hideDialog(),e(k.value))});c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});
c.className="geBtn";a.editor.cancelFirst&&d.appendChild(c);f=mxUtils.button(f,function(){a.hideDialog();e(k.value)});f.className="geBtn gePrimaryBtn";d.appendChild(f);a.editor.cancelFirst||d.appendChild(c);g.appendChild(d);this.container=g},OutlineWindow=function(a,c,f,e,g){var d=a.editor.graph,k=document.createElement("div");k.style.position="absolute";k.style.width="100%";k.style.height="100%";k.style.overflow="hidden";this.window=new mxWindow(mxResources.get("outline"),k,c,f,e,g,!0,!0);this.window.minimumSize=