[webkit-reviews] review granted: [Bug 39175] Properly handle invalid arguments to CanvasRenderingContext2D's getImageData() and putImageData() : [Attachment 56185] Proposed patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun May 16 09:11:27 PDT 2010


Kenneth Rohde Christiansen <kenneth at webkit.org> has granted Andreas Kling
<andreas.kling at nokia.com>'s request for review:
Bug 39175: Properly handle invalid arguments to CanvasRenderingContext2D's
getImageData() and putImageData()
https://bugs.webkit.org/show_bug.cgi?id=39175

Attachment 56185: Proposed patch
https://bugs.webkit.org/attachment.cgi?id=56185&action=review

------- Additional Comments from Kenneth Rohde Christiansen
<kenneth at webkit.org>
> +
> +    if (!isfinite(sx) || !isfinite(sy) || !isfinite(sw) || !isfinite(sh)) {
> +	   ec = NOT_SUPPORTED_ERR;
> +	   return 0;
> +    }
> +
> +    if (!sw || !sh) {
> +	   ec = INDEX_SIZE_ERR;
> +	   return 0;
> +    }

Doesnt it make sense to put this test before the first one? I mean check !sw
before !isfinite(sh) ?


More information about the webkit-reviews mailing list