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.initCanvas=function(){var a=this.editor.graph;a.timerAutoScroll=!0;a.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((a.container.offsetWidth-34)/a.view.scale)),Math.max(0,Math.round((a.container.offsetHeight-34)/a.view.scale)))};a.view.getBackgroundPageBounds=function(){var H=this.graph.getPageLayout(),S=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+H.x*S.width),this.scale*(this.translate.y+H.y*S.height),this.scale*H.width*S.width,
this.scale*H.height*S.height)};a.getPreferredPageSize=function(H,S,V){H=this.getPageLayout();S=this.getPageSize();return new mxRectangle(0,0,H.width*S.width,H.height*S.height)};var b=null,f=this;if(this.editor.isChromelessView()){this.chromelessResize=b=mxUtils.bind(this,function(H,S,V,ea){if(null!=a.container&&!a.isViewer()){V=null!=V?V:0;ea=null!=ea?ea:0;var ka=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),wa=mxUtils.hasScrollbars(a.container),W=a.view.translate,Z=a.view.scale,