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:
Math.max(K/z,N/z);if(1<H){var ka=Math.round(K/H),ea=Math.round(N/H),ca=document.createElement("canvas");ca.width=ka;ca.height=ea;ca.getContext("2d").drawImage(d,0,0,ka,ea);var ja=ca.toDataURL();if(ja.length<f.length){var ma=document.createElement("canvas");ma.width=ka;ma.height=ea;var Z=ma.toDataURL();ja!==Z&&(f=ja,K=ka,N=ea)}}}catch(S){}k(f,K,N)};EditorUi.prototype.extractGraphModelFromPng=function(d){return Editor.extractGraphModelFromPng(d)};EditorUi.prototype.loadImage=function(d,f,k){try{var u=
new Image;u.onload=function(){u.width=0<u.width?u.width:120;u.height=0<u.height?u.height:120;f(u)};null!=k&&(u.onerror=k);u.src=d}catch(z){if(null!=k)k(z);else throw z;}};EditorUi.prototype.getDefaultSketchMode=function(){var d="1"==urlParams.sketch;return"0"!=(null!=urlParams.rough?urlParams.rough:d)};var y=EditorUi.prototype.createUi;EditorUi.prototype.createUi=function(){Editor.isSettingsEnabled()&&(this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&null==urlParams.rough&&null==urlParams.sketch?