Bug 262650

Summary: CMSampleBufferGetSampleAttachmentsArray return value is not checked for nullptr
Product: WebKit Reporter: Brent Fulgham <bfulgham>
Component: MediaAssignee: Brent Fulgham <bfulgham>
Status: RESOLVED FIXED    
Severity: Normal CC: webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 262556    
Bug Blocks:    

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.