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:
Menus.prototype.get=function(a){return this.menus[a]};Menus.prototype.addSubmenu=function(a,b,f,e){var g=this.get(a);null!=g&&(g=g.isEnabled(),b.showDisabled||g)&&(f=b.addItem(e||mxResources.get(a),null,null,f,null,g),this.addMenu(a,b,f))};Menus.prototype.addMenu=function(a,b,f){var e=this.get(a);null!=e&&(b.showDisabled||e.isEnabled())&&this.get(a).execute(b,f)};