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:
StyleFormatPanel.prototype.addStroke=function(a){function c(W){var Z=parseFloat(E.value);Z=Math.min(999,Math.max(0,isNaN(Z)?1:Z));Z!=mxUtils.getValue(d.style,mxConstants.STYLE_STROKEWIDTH,1)&&(g.setCellStyles(mxConstants.STYLE_STROKEWIDTH,Z,d.cells),e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[Z],"cells",d.cells)));E.value=Z+" pt";mxEvent.consume(W)}function f(W){var Z=parseFloat(O.value);Z=Math.min(999,Math.max(0,isNaN(Z)?1:Z));Z!=mxUtils.getValue(d.style,
mxConstants.STYLE_STROKEWIDTH,1)&&(g.setCellStyles(mxConstants.STYLE_STROKEWIDTH,Z,d.cells),e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[Z],"cells",d.cells)));O.value=Z+" pt";mxEvent.consume(W)}var e=this.editorUi,g=e.editor.graph,d=e.getSelectionState();a.style.paddingTop="6px";a.style.paddingBottom="4px";a.style.whiteSpace="normal";var k=document.createElement("div");k.style.fontWeight="bold";d.stroke||(k.style.display="none");var n=document.createElement("select");