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:
DiagramFormatPanel.prototype.addView=function(a){var b=this.editorUi,f=b.editor.graph;a.appendChild(this.createTitle(mxResources.get("view")));this.addGridOption(a);DiagramFormatPanel.showPageView&&a.appendChild(this.createOption(mxResources.get("pageView"),function(){return f.pageVisible},function(d){b.actions.get("pageView").funct()},{install:function(d){this.listener=function(){d(f.pageVisible)};b.addListener("pageViewChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}}));
if(f.isEnabled()){var e=this.createColorOption(mxResources.get("background"),function(){return f.background},function(d){var k=new ChangePageSetup(b,d);k.ignoreImage=null!=d&&d!=mxConstants.NONE;f.model.execute(k)},"#ffffff",{install:function(d){this.listener=function(){d(f.background)};b.addListener("backgroundColorChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}});if(this.showBackgroundImageOption){var g=e.getElementsByTagName("span")[0];g.style.display="inline-block";
g.style.textOverflow="ellipsis";g.style.overflow="hidden";g.style.maxWidth="68px";mxClient.IS_FF&&(g.style.marginTop="1px");g=mxUtils.button(mxResources.get("change"),function(d){b.showBackgroundImageDialog(null,b.editor.graph.backgroundImage);mxEvent.consume(d)});g.className="geColorBtn";g.style.position="absolute";g.style.marginTop="-3px";g.style.height="22px";g.style.left="118px";g.style.width="56px";e.appendChild(g)}a.appendChild(e)}return a};