Language: JavaScript
Label: vulnerable
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,O/z);if(1<H){var ka=Math.round(K/H),fa=Math.round(O/H),ca=document.createElement("canvas");ca.width=ka;ca.height=fa;ca.getContext("2d").drawImage(d,0,0,ka,fa);var ja=ca.toDataURL();if(ja.length<f.length){var ma=document.createElement("canvas");ma.width=ka;ma.height=fa;var aa=ma.toDataURL();ja!==aa&&(f=ja,K=ka,O=fa)}}}catch(S){}k(f,K,O)};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?