Segfault on gstreamer_sdp::SDPMessage::parse_buffer
Created by: maxmcd
Example code:
let ret = gstreamer_sdp::SDPMessage::parse_buffer(b"t=0 0\r\n").unwrap();
Valgrind output:
==5178== Invalid read of size 4
==5178== at 0x58E94D9: gst_sdp_message_emails_len (gstsdpmessage.c:897)
==5178== by 0x58ED356: gst_sdp_message_as_text (gstsdpmessage.c:499)
==5178== by 0x2D2920: gstreamer_sdp::sdp_message::SDPMessage::as_text (sdp_message.rs:134)
==5178== by 0x19A9CA: <gst_rust::WsClient as ws::handler::Handler>::on_message (main.rs:239)
==5178== by 0x146C75: <ws::connection::Connection<H>>::read_frames (connection.rs:658)
==5178== by 0x150020: <ws::connection::Connection<H>>::read (connection.rs:602)
==5178== by 0x16BECB: <ws::io::Handler<F>>::handle_event (io.rs:548)
==5178== by 0x169A46: <ws::io::Handler<F>>::event_loop (io.rs:429)
==5178== by 0x175502: <ws::io::Handler<F>>::run (io.rs:396)
==5178== by 0x120042: <ws::WebSocket<F>>::run (lib.rs:331)
==5178== by 0x11FC73: ws::connect (lib.rs:121)
==5178== by 0x19ACA3: gst_rust::connect_to_websocket_server_async (main.rs:264)
==5178== Address 0x8 is not stack'd, malloc'd or (recently) free'd
Digging into this a little bit more now, but hoping I might be missing something obvious.
I simplified the buffer value to hopefully provide a more concise failure example, but it also segfaults with a full SDP offer.