Language: JavaScript
Label: vulnerable
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:
0;g<d.length;g++)mxUtils.bind(this,function(l){var q=new FileReader;q.onload=mxUtils.bind(this,function(y){try{this.openFileHandle(y.target.result,l.name,l,f)}catch(F){this.handleError(F)}});q.onerror=mxUtils.bind(this,function(y){this.spinner.stop();this.handleError(y);window.openFile=null});"image"!==l.type.substring(0,5)&&"application/pdf"!==l.type||"image/svg"===l.type.substring(0,9)?q.readAsText(l):q.readAsDataURL(l)})(d[g])};EditorUi.prototype.openLocalFile=function(d,f,g,l,q){var y=this.getCurrentFile(),
F=mxUtils.bind(this,function(){window.openFile=null;if(null==f&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var C=mxUtils.parseXml(d);null!=C&&(this.editor.setGraphXml(C.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,d,f||this.defaultFilename,g,l,q))});if(null!=d&&0<d.length)null==y||!y.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=l)?F():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=l)&&null!=y&&y.isModified()?this.confirm(mxResources.get("allChangesLost"),
null,F,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(d,f),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=y&&y.isModified()?this.confirm(mxResources.get("allChangesLost"),null,F,mxResources.get("cancel"),mxResources.get("discardChanges")):F()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var d={};if(null!=this.pages)for(var f=