Bug 249057 - Fix use-after-move in WebCore::RealtimeMediaSource::supportsSizeAndFrameRate()
Summary: Fix use-after-move in WebCore::RealtimeMediaSource::supportsSizeAndFrameRate()
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: David Kilzer (:ddkilzer)
URL:
Keywords: InRadar
Depends on: 210932
Blocks:
  Show dependency treegraph
 
Reported: 2022-12-09 17:40 PST by David Kilzer (:ddkilzer)
Modified: 2022-12-10 13:37 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 David Kilzer (:ddkilzer) 2022-12-09 17:40:33 PST
Fix use-after-move in WebCore::RealtimeMediaSource::supportsSizeAndFrameRate().

Both `width` and `height` have a use-after-move bug in Source/WebCore/platform/mediastream/RealtimeMediaSource.cpp:

```
    if (!supportsSizeAndFrameRate(WTFMove(width), WTFMove(height), WTFMove(frameRate))) {
        // Let's try without frame rate constraint if not mandatory.
        if (frameRateConstraint && !frameRateConstraint->isMandatory() && supportsSizeAndFrameRate(WTFMove(width), WTFMove(height), { }))
```
Comment 1 Radar WebKit Bug Importer 2022-12-09 17:40:47 PST
<rdar://problem/103201164>
Comment 2 David Kilzer (:ddkilzer) 2022-12-09 17:42:31 PST
Pull request: https://github.com/WebKit/WebKit/pull/7424
Comment 3 EWS 2022-12-10 13:37:51 PST
Committed 257685@main (c8239ff245f1): <https://commits.webkit.org/257685@main>

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