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:
k,u=0;8>u;u++)m=1==(m&1)?3988292384^m>>>1:m>>>1,Editor.crcTable[k]=m;Editor.updateCRC=function(l,z,J,O){for(var T=0;T<O;T++)l=Editor.crcTable[(l^z.charCodeAt(J+T))&255]^l>>>8;return l};Editor.crc32=function(l){for(var z=-1,J=0;J<l.length;J++)z=z>>>8^Editor.crcTable[(z^l.charCodeAt(J))&255];return(z^-1)>>>0};Editor.writeGraphModelToPng=function(l,z,J,O,T){function W(Y,aa){var ca=X;X+=aa;return Y.substring(ca,X)}function V(Y){Y=W(Y,4);return Y.charCodeAt(3)+(Y.charCodeAt(2)<<8)+(Y.charCodeAt(1)<<16)+
(Y.charCodeAt(0)<<24)}function S(Y){return String.fromCharCode(Y>>24&255,Y>>16&255,Y>>8&255,Y&255)}l=l.substring(l.indexOf(",")+1);l=window.atob?atob(l):Base64.decode(l,!0);var X=0;if(W(l,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=T&&T();else if(W(l,4),"IHDR"!=W(l,4))null!=T&&T();else{W(l,17);T=l.substring(0,X);do{var Z=V(l);if("IDAT"==W(l,4)){T=l.substring(0,X-8);"pHYs"==z&&"dpi"==J?(J=Math.round(O/.0254),J=S(J)+S(J)+String.fromCharCode(1)):J=J+String.fromCharCode(0)+
("zTXt"==z?String.fromCharCode(0):"")+O;O=4294967295;O=Editor.updateCRC(O,z,0,4);O=Editor.updateCRC(O,J,0,J.length);T+=S(J.length)+z+J+S(O^4294967295);T+=l.substring(X-8,l.length);break}T+=l.substring(X-8,X-4+Z);W(l,Z);W(l,4)}while(Z);return"data:image/png;base64,"+(window.btoa?btoa(T):Base64.encode(T,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.drawio.com/doc/faq/save-file-formats";var v=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(l,z){v.apply(this,