Bug 262650 - CMSampleBufferGetSampleAttachmentsArray return value is not checked for nullptr
Summary: CMSampleBufferGetSampleAttachmentsArray return value is not checked for nullptr
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Brent Fulgham
URL:
Keywords: InRadar
Depends on: 262556
Blocks:
  Show dependency treegraph
 
Reported: 2023-10-04 14:28 PDT by Brent Fulgham
Modified: 2023-12-04 11:36 PST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brent Fulgham 2023-10-04 14:28:38 PDT
While reviewing a common crash (Bug 262556) I noticed that the missing nullptr check was the return value for CMSampleBufferGetSampleAttachmentsArray.

CMSampleBufferGetSampleAttachmentsArray declares that its return value as CM_NULLABLE, to warn users that a nullptr value might be returned.

I reviewed other code with CMSampleBufferGetSampleAttachmentsArray, and while we almost always check the return value, there was one places where we did not.

This patch adds the missing nullptr check.

<rdar://116485149>
Comment 1 Brent Fulgham 2023-10-04 14:32:32 PDT
Pull request: https://github.com/WebKit/WebKit/pull/18645
Comment 2 EWS 2023-12-04 11:36:34 PST
Committed 271496@main (bcde08d1581e): <https://commits.webkit.org/271496@main>

Reviewed commits have been landed. Closing PR #18645 and removing active labels.