Summary: | [iOS, macOS] Guard against passing nullptr to vImagePremultiplyData | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Brent Fulgham <bfulgham> | ||||||
Component: | WebCore Misc. | Assignee: | Brent Fulgham <bfulgham> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | beidson, bfulgham, ddkilzer, dino, sabouhallawa, zalan | ||||||
Priority: | P2 | Keywords: | InRadar | ||||||
Version: | WebKit Nightly Build | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Description
Brent Fulgham
2017-04-17 13:35:27 PDT
Created attachment 307292 [details]
Patch
Comment on attachment 307292 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=307292&action=review > Source/WebCore/platform/graphics/cg/ImageBufferDataCG.cpp:444 > + ASSERT(data); > + if (!data) > + return; We can't really both expect that is' impossible to have a null data (like the assert says) but also expect it is possible to have a null data (like the early return says) If it's truly impossible, we need to know why. If it's truly possible (such as we commonly get into the case where memory can't be allocated), then the ASSERT should be dropped. Comment on attachment 307292 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=307292&action=review >> Source/WebCore/platform/graphics/cg/ImageBufferDataCG.cpp:444 >> + return; > > We can't really both expect that is' impossible to have a null data (like the assert says) but also expect it is possible to have a null data (like the early return says) > > If it's truly impossible, we need to know why. > > If it's truly possible (such as we commonly get into the case where memory can't be allocated), then the ASSERT should be dropped. Good point. I'll revise. Created attachment 307439 [details]
Patch
Committed r215514: <http://trac.webkit.org/changeset/215514> |