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(a){if(1<a.cells.length&&a.cell){for(var c=mxUtils.sortCells(a.cells),f=this.editor.graph.model,e=f.getParent(c[0]),g=f.getParent(e),d=e.getIndex(c[0]),k=g.getIndex(e),n=null,u=1,m=1,r=0,x=k<g.getChildCount()-1?f.getChildAt(f.getChildAt(g,k+1),d):null;r<c.length-1;){var A=c[++r];null==x||x!=A||null!=n&&u!=n||(n=u,u=0,m++,e=f.getParent(x),x=k+m<g.getChildCount()?f.getChildAt(f.getChildAt(g,k+m),d):null);var C=this.editor.graph.view.getState(A);
if(A==f.getChildAt(e,d+u)&&null!=C&&1==mxUtils.getValue(C.style,"colspan",1)&&1==mxUtils.getValue(C.style,"rowspan",1))u++;else break}r==m*u-1&&(a.mergeCell=c[0],a.colspan=u,a.rowspan=m)}};