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:
StyleFormatPanel.prototype.addEffects=function(a){var c=this.editorUi,f=c.editor.graph,e=c.getSelectionState();a.style.paddingTop="4px";a.style.paddingBottom="0px";var g=document.createElement("table");g.style.width="210px";g.style.fontWeight="bold";g.style.tableLayout="fixed";var d=document.createElement("tbody"),k=document.createElement("tr");k.style.padding="0px";var n=document.createElement("td");n.style.padding="0px";n.style.width="50%";n.setAttribute("valign","top");var u=n.cloneNode(!0);u.style.paddingLeft=
"8px";k.appendChild(n);k.appendChild(u);d.appendChild(k);g.appendChild(d);a.appendChild(g);var m=n,r=0,x=mxUtils.bind(this,function(C,F,K){C=this.createCellOption(C,F,K);C.style.width="100%";m.appendChild(C);m=m==n?u:n;r++}),A=mxUtils.bind(this,function(C,F,K){e=c.getSelectionState();n.innerHTML="";u.innerHTML="";m=n;e.rounded&&x(mxResources.get("rounded"),mxConstants.STYLE_ROUNDED,0);e.swimlane&&x(mxResources.get("divider"),"swimlaneLine",1);e.containsImage||x(mxResources.get("shadow"),mxConstants.STYLE_SHADOW,
0);e.glass&&x(mxResources.get("glass"),mxConstants.STYLE_GLASS,0);x(mxResources.get("sketch"),"sketch",0)});f.getModel().addListener(mxEvent.CHANGE,A);this.listeners.push({destroy:function(){f.getModel().removeListener(A)}});A();return a};StyleFormatPanel.prototype.addStyleOps=function(a){a.style.paddingTop="10px";a.style.paddingBottom="10px";this.addActions(a,["setAsDefaultStyle"]);return a};DiagramStylePanel=function(a,c,f){BaseFormatPanel.call(this,a,c,f);this.init()};