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:
BaseFormatPanel.prototype.createCellColorOption=function(a,c,f,e,g,d){var k=this.editorUi,n=k.editor.graph;return this.createColorOption(a,function(){var u=n.view.getState(k.getSelectionState().cells[0]);return null!=u?mxUtils.getValue(u.style,c,null):null},function(u,m){n.getModel().beginUpdate();try{var r=k.getSelectionState().cells;n.setCellStyles(c,u,r);null!=g&&g(u);k.fireEvent(new mxEventObject("styleChanged","keys",[c],"values",[u],"cells",r))}finally{n.getModel().endUpdate()}},f||mxConstants.NONE,
{install:function(u){this.listener=function(){var m=n.view.getState(k.getSelectionState().cells[0]);null!=m&&u(mxUtils.getValue(m.style,c,null),!0)};n.getModel().addListener(mxEvent.CHANGE,this.listener)},destroy:function(){n.getModel().removeListener(this.listener)}},e,null,d)};