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:
PrintDialog.prototype.create=function(b){function e(F){var C=E.checked||g.checked,H=parseInt(q.value)/100;isNaN(H)&&(H=1,q.value="100%");H*=.75;var G=k.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,aa=1/k.pageScale;if(C){var da=E.checked?1:parseInt(m.value);isNaN(da)||(aa=mxUtils.getScaleForPageCount(da,k,G))}k.getGraphBounds();var ba=da=0;G=mxRectangle.fromRectangle(G);G.width=Math.ceil(G.width*H);G.height=Math.ceil(G.height*H);aa*=H;!C&&k.pageVisible?(H=k.getPageLayout(),da-=H.x*G.width,ba-=H.y*
G.height):C=!0;C=PrintDialog.createPrintPreview(k,aa,G,0,da,ba,C);C.open();F&&PrintDialog.printPreview(C)}var k=b.editor.graph,n=document.createElement("table");n.style.width="100%";n.style.height="100%";var D=document.createElement("tbody");var t=document.createElement("tr");var E=document.createElement("input");E.setAttribute("type","checkbox");var d=document.createElement("td");d.setAttribute("colspan","2");d.style.fontSize="10pt";d.appendChild(E);var f=document.createElement("span");mxUtils.write(f,