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:
mxResources.get("resizeLargeImages"),function(y){q(y,!0)},function(y){q(y,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,!0,!0):q(!1,l)};EditorUi.prototype.parseFile=function(d,f,g){g=null!=g?g:d.name;var l=new FileReader;l.onload=mxUtils.bind(this,function(){this.parseFileData(l.result,
f,g)});l.readAsText(d)};EditorUi.prototype.parseFileData=function(d,f,g){var l=new XMLHttpRequest;l.open("POST",OPEN_URL);l.setRequestHeader("Content-Type","application/x-www-form-urlencoded");l.onreadystatechange=function(){f(l)};l.send("format=xml&filename="+encodeURIComponent(g)+"&data="+encodeURIComponent(d));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(q){}};EditorUi.prototype.isResampleImageSize=function(d,f){f=null!=f?f:this.resampleThreshold;return d>