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:
Graph.prototype.replaceDefaultColors=function(a,b){if(null!=b){a=mxUtils.hex2rgb(this.shapeBackgroundColor);var f=mxUtils.hex2rgb(this.shapeForegroundColor);this.replaceDefaultColor(b,mxConstants.STYLE_FONTCOLOR,f);this.replaceDefaultColor(b,mxConstants.STYLE_FILLCOLOR,a);this.replaceDefaultColor(b,mxConstants.STYLE_STROKECOLOR,f);this.replaceDefaultColor(b,mxConstants.STYLE_IMAGE_BORDER,f);this.replaceDefaultColor(b,mxConstants.STYLE_IMAGE_BACKGROUND,a);this.replaceDefaultColor(b,mxConstants.STYLE_LABEL_BORDERCOLOR,
f);this.replaceDefaultColor(b,mxConstants.STYLE_SWIMLANE_FILLCOLOR,a);this.replaceDefaultColor(b,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,a)}return b};Graph.prototype.replaceDefaultColor=function(a,b,f){null!=a&&"default"==a[b]&&null!=f&&(a[b]=f)};