meetecho / janus-gateway

Janus WebRTC Server
https://janus.conf.meetecho.com
GNU General Public License v3.0
8.02k stars 2.45k forks source link

[Unified Plan] SDP parsing segfault on build without usrsctp #1700

Closed Bug-Fairy closed 5 years ago

Bug-Fairy commented 5 years ago

Janus crash on Debian 10 when running echotest on Firefox.

Caused by building without usrsctp and offering data channel. janus_handle_webrtc_medium_create(handle, JANUS_MEDIA_UNKNOWN) returns NULL when further logic expects medium to never be NULL. https://github.com/meetecho/janus-gateway/blob/unified-plan/sdp.c#L195

Edit: Exact crash line: https://github.com/meetecho/janus-gateway/blob/unified-plan/sdp.c#L205

lminiero commented 5 years ago

Thanks for spotting this, I'll have a look :+1:

lminiero commented 5 years ago

Fixed in this commit https://github.com/meetecho/janus-gateway/pull/1459/commits/66bff683b5f1c83ddca520e634a9010058c20942