Language: JavaScript
Label: safe
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:
EditorUi.prototype.showImageDialog=function(a,b,f,e){e=this.editor.graph.cellEditor;var g=e.saveSelection(),d=mxUtils.prompt(a,b);e.restoreSelection(g);if(null!=d&&0<d.length){var k=new Image;k.onload=function(){f(d,k.width,k.height)};k.onerror=function(){f(null);mxUtils.alert(mxResources.get("fileNotFound"))};k.src=d}else f(null)};EditorUi.prototype.showLinkDialog=function(a,b,f){a=new LinkDialog(this,a,b,f);this.showDialog(a.container,420,90,!0,!0);a.init()};