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:
U.prototype.quadTo=function(b,h,q,l){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=q;this.lastY=l};U.prototype.curveTo=function(b,h,q,l,p,v){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=p;this.lastY=v};U.prototype.arcTo=function(b,h,q,l,p,v,w){this.originalArcTo.apply(this.canvas,arguments);this.lastX=v;this.lastY=w};U.prototype.lineTo=function(b,h){if(null!=this.lastX&&null!=this.lastY){var q=function(N){return"number"===typeof N?N?0>N?-1:1:N===N?0:NaN:NaN},l=Math.abs(b-