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