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:
Sidebar.prototype.addStencilPalette=function(a,b,f,e,g,d,k,n,u,m){k=null!=k?k:1;if(this.addStencilsToIndex){var r=[];if(null!=u)for(m=0;m<u.length;m++)r.push(u[m]);mxStencilRegistry.loadStencilSet(f,mxUtils.bind(this,function(x,A,C,F,K){if(null==g||0>mxUtils.indexOf(g,A)){C=this.getTagsForStencil(x,A);var E=null!=n?n[A]:null;null!=E&&C.push(E);r.push(this.createVertexTemplateEntry("shape="+x+A.toLowerCase()+e,Math.round(F*k),Math.round(K*k),"",A.replace(/_/g," "),null,null,this.filterTags(C.join(" "))))}}),
!0,!0);this.addPaletteFunctions(a,b,!1,r)}else this.addPalette(a,b,!1,mxUtils.bind(this,function(x){null==e&&(e="");null!=d&&d.call(this,x);if(null!=u)for(var A=0;A<u.length;A++)u[A](x);mxStencilRegistry.loadStencilSet(f,mxUtils.bind(this,function(C,F,K,E,O){(null==g||0>mxUtils.indexOf(g,F))&&x.appendChild(this.createVertexTemplate("shape="+C+F.toLowerCase()+e,Math.round(E*k),Math.round(O*k),"",F.replace(/_/g," "),!0))}),!0)}))};