Language: JavaScript
Label: safe
CWE: CWE-78 \u2014 Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.

Code:
mxJsCanvas.prototype.setGradient=function(b,e,f,c,k,m,u,v,E){f=this.ctx.createLinearGradient(0,c,0,c+m);c=this.state;c.fillColor=b;c.fillAlpha=null!=v?v:1;c.gradientColor=e;c.gradientAlpha=null!=E?E:1;c.gradientDirection=u;b=this.hexToRgb(b);e=this.hexToRgb(e);null!=b&&f.addColorStop(0,"rgba("+b.r+","+b.g+","+b.b+","+c.fillAlpha+")");null!=e&&f.addColorStop(1,"rgba("+e.r+","+e.g+","+e.b+","+c.gradientAlpha+")");this.ctx.fillStyle=f};