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:
BaseFormatPanel.prototype.createOption=function(a,c,f,e,g){var d=document.createElement("div");d.style.padding="3px 0px 3px 0px";d.style.whiteSpace="nowrap";d.style.textOverflow="ellipsis";d.style.overflow="hidden";d.style.width="200px";d.style.height="18px";var k=document.createElement("input");k.setAttribute("type","checkbox");k.style.margin="1px 6px 0px 0px";k.style.verticalAlign="top";d.appendChild(k);var n=document.createElement("span");n.style.verticalAlign="top";n.style.userSelect="none";mxUtils.write(n,
a);d.appendChild(n);var u=!1,m=c(),r=function(x,A){u||(u=!0,x?(k.setAttribute("checked","checked"),k.defaultChecked=!0,k.checked=!0):(k.removeAttribute("checked"),k.defaultChecked=!1,k.checked=!1),m!=x&&(m=x,c()!=m&&f(m,A)),u=!1)};mxEvent.addListener(d,"click",function(x){if("disabled"!=k.getAttribute("disabled")){var A=mxEvent.getSource(x);if(A==d||A==n)k.checked=!k.checked;r(k.checked,x)}});r(m);null!=e&&(e.install(r),this.listeners.push(e));null!=g&&g(d);return d};