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:
EditorUi.prototype.updateSelectionStateForTableCells=function(b){if(1<b.cells.length&&b.cell){for(var e=mxUtils.sortCells(b.cells),k=this.editor.graph.model,n=k.getParent(e[0]),D=k.getParent(n),t=n.getIndex(e[0]),E=D.getIndex(n),d=null,f=1,g=1,l=0,q=E<D.getChildCount()-1?k.getChildAt(k.getChildAt(D,E+1),t):null;l<e.length-1;){var y=e[++l];null==q||q!=y||null!=d&&f!=d||(d=f,f=0,g++,n=k.getParent(q),q=E+g<D.getChildCount()?k.getChildAt(k.getChildAt(D,E+g),t):null);var F=this.editor.graph.view.getState(y);
if(y==k.getChildAt(n,t+f)&&null!=F&&1==mxUtils.getValue(F.style,"colspan",1)&&1==mxUtils.getValue(F.style,"rowspan",1))f++;else break}l==g*f-1&&(b.mergeCell=e[0],b.colspan=f,b.rowspan=g)}};