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.centerShapePicker=function(a,c,f,e,g){if(g==mxConstants.DIRECTION_EAST||g==mxConstants.DIRECTION_WEST)a.style.width="40px";var d=a.getBoundingClientRect();g==mxConstants.DIRECTION_NORTH?(f-=d.width/2-10,e-=d.height+6):g==mxConstants.DIRECTION_SOUTH?(f-=d.width/2-10,e+=c.height+6):g==mxConstants.DIRECTION_WEST?(f-=d.width+6,e-=d.height/2-10):g==mxConstants.DIRECTION_EAST&&(f+=c.width+6,e-=d.height/2-10);a.style.left=f+"px";a.style.top=e+"px"};