RESOLVED FIXED 219651
REGRESSION(r254841): Possible null pointer reference in BitmapImage::preTransformedNativeImageForCurrentFrame()
https://bugs.webkit.org/show_bug.cgi?id=219651
Summary REGRESSION(r254841): Possible null pointer reference in BitmapImage::preTrans...
Said Abou-Hallawa
Reported 2020-12-08 12:31:45 PST
This function was added in r254841 under the name BitmapImage::nativeImageForCurrentFrameRespectingOrientation() without checking whether the resulted image of nativeImageForCurrentFrame() is null or not. If the ImageSource is corrupted, the decoder might return a null PlatformImagePtr for the current frame. And if this happens most likely ImageSource::densityCorrectedSize() will return WTF::nullopt also. In this case, we end up calling GraphicsContext::drawPlatformImage() with a null PlatformImagePtr.
Attachments
Patch (2.16 KB, patch)
2020-12-08 13:09 PST, Said Abou-Hallawa
no flags
Said Abou-Hallawa
Comment 1 2020-12-08 12:43:49 PST
Said Abou-Hallawa
Comment 2 2020-12-08 13:09:39 PST
EWS
Comment 3 2020-12-08 16:11:06 PST
Committed r270562: <https://trac.webkit.org/changeset/270562> All reviewed patches have been landed. Closing bug and clearing flags on attachment 415666 [details].
Note You need to log in before you can comment on or make changes to this bug.