Bug 184292 - [GTK] Undefined Behavior / crash in WebRtcVideoChannel::WebRtcVideoChannel() with null encoder_factory
Summary: [GTK] Undefined Behavior / crash in WebRtcVideoChannel::WebRtcVideoChannel() ...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebRTC (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-04-04 01:05 PDT by Ms2ger (he/him; ⌚ UTC+1/+2)
Modified: 2021-03-23 09:41 PDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ms2ger (he/him; ⌚ UTC+1/+2) 2018-04-04 01:05:19 PDT
If encoder_factory_ is null, AssignPayloadTypesAndDefaultCodecs() returns an empty vector, MapCodecs takes the empty vector, asserts in debug builds, and returns a new empty vector in release builds, and then we call front() unconditionally, which is Undefined Behavior for an empty vector.

This appears to cause a crash in fast/mediastream/RTCPeerConnection-addIceCandidate.html.
Comment 1 Alejandro G. Castro 2018-04-04 01:23:11 PDT
Thanks for reporting. WebRTC support for GTK port is still not complete, we are still pushing code upstream which would include enabling all the mediastream tests, we are currently working on it. We can leave this bug open to keep this issue in mind for the moment we have everything in place.
Comment 2 Xabier Rodríguez Calvar 2021-03-23 09:41:36 PDT
Usecase?