MPEG-TS, Rust, and C strings – the ongoing saga
Russel Winder
russel at winder.org.uk
Thu Jul 18 16:07:44 UTC 2019
On Thu, 2019-07-18 at 11:41 +0100, Russel Winder wrote:
[…]
> 3. I am getting a SIGSEGV when processing ShortEvent descriptors early on.
> In
> each run I process some ShortEvent descriptors entirely fine. However very
> quickly there is a ShortEvent descriptor that delivers back a string that is
> seemingly not a C string.
>
[…]
> 3. is about having called:
>
> gst_mpegts_sys::gst_mpegts_descriptor_parse_dvb_short_event(descriptor, &mut
> language_code, &mut name, &mut text) != 0 {
>
> and language_code being a pointer to a C string but name not being. In
> earlier
> calls everything worked so I believe it is not my code (but as ever I am
> happy
> to be proved wrong). It appears that Freeview is delivering a ShortEvent
> descriptor such that this C code in MPEG-TS is not delivering back a C
> string
> for name, but instead doing a SIGSEGV in the sys::strlen called at line 965
> of
> c_str.rs.
>
> I shall extract the data of the descriptor to create a test case as soon as
> I
> can.
The following is the data field of a descriptor received from Freeview that
caused a SIGSEGV in sys::strlen.
[77, 100, 101, 110, 103, 9, 31, 1, 123, 147, 109, 184, 138, 157, 128, 86, 31,
2, 39, 255, 219, 169, 50, 72, 51, 1, 109, 75, 238, 110, 69, 145, 164, 245, 19,
128, 212, 72, 153, 84, 148, 31, 56, 239, 241, 207, 233, 187, 166, 186, 230,
17, 239, 113, 82, 223, 235, 101, 203, 251, 78, 234, 253, 139, 24, 215, 78,
182, 182, 214, 216, 210, 213, 122, 94, 165, 235, 66, 148, 248, 118, 146, 125,
54, 115, 57, 20, 190, 253, 84, 91, 105, 223, 105, 117, 50, 226, 223, 163, 224]
I guess this is now time to create an actual bug report.
--
Russel.
===========================================
Dr Russel Winder t: +44 20 7585 2200
41 Buckmaster Road m: +44 7770 465 077
London SW11 1EN, UK w: www.russel.org.uk
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20190718/5af0f4c3/attachment.sig>
More information about the gstreamer-devel
mailing list