[webkit-reviews] review granted: [Bug 231794] Avoid null pointer dereference when creating ImageBitmap from a null image : [Attachment 441331] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Oct 18 20:31:33 PDT 2021


Said Abou-Hallawa <sabouhallawa at apple.com> has granted John Cunningham
<johncunningham at apple.com>'s request for review:
Bug 231794: Avoid null pointer dereference when creating ImageBitmap from a
null image
https://bugs.webkit.org/show_bug.cgi?id=231794

Attachment 441331: Patch

https://bugs.webkit.org/attachment.cgi?id=441331&action=review




--- Comment #4 from Said Abou-Hallawa <sabouhallawa at apple.com> ---
Comment on attachment 441331
  --> https://bugs.webkit.org/attachment.cgi?id=441331
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=441331&action=review

r=me based on Cameron's review.

>> Source/WebCore/ChangeLog:3
>> +	    Reject createImageBitmap request earlier if the image is null.
Also, fix a null ptr deref by checking that the native image is nonnull when
requesting the colorspace, otherwise, return a default of SRGB.
> 
> Nit: Two sentences is a bit long for this line. :-) I would mention the more
important fix here like "Avoid null pointer dereference when creating
ImageBitmap from a null image", and then put the details about defaulting to
sRGB and rejecting the promise earlier below, just below the "Reviewed by"
line.

Yes please change it to the shorter description.

> Source/WebCore/ChangeLog:9
> +	   No new tests (OOPS!).

This line should be removed before committing. It will be great if we can get a
layout test though.


More information about the webkit-reviews mailing list