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.addOptions=function(a){var b=this.editorUi,f=b.editor.graph;a.appendChild(this.createTitle(mxResources.get("options")));f.isEnabled()&&(a.appendChild(this.createOption(mxResources.get("connectionArrows"),function(){return f.connectionArrowsEnabled},function(e){b.actions.get("connectionArrows").funct()},{install:function(e){this.listener=function(){e(f.connectionArrowsEnabled)};b.addListener("connectionArrowsChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}})),
a.appendChild(this.createOption(mxResources.get("connectionPoints"),function(){return f.connectionHandler.isEnabled()},function(e){b.actions.get("connectionPoints").funct()},{install:function(e){this.listener=function(){e(f.connectionHandler.isEnabled())};b.addListener("connectionPointsChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}})),a.appendChild(this.createOption(mxResources.get("guides"),function(){return f.graphHandler.guidesEnabled},function(e){b.actions.get("guides").funct()},
{install:function(e){this.listener=function(){e(f.graphHandler.guidesEnabled)};b.addListener("guidesEnabledChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}})));return a};