GNOME Bugzilla – Bug 686358
tsdemux: fix potential crash dereferencing NULL program pointer
Last modified: 2012-10-18 17:19:20 UTC
Under some circunstances, push_pending_data might be call after program_stopped and demux->program is NULL Program received signal SIGSEGV, Segmentation fault. [Cambiando a Thread 0x7fffe8d32700 (LWP 27533)] 0x00007fffe8023e34 in gst_ts_demux_push_pending_data (demux=0x7fffed77ea80, stream=0x7fffe4055e00) at tsdemux.c:1511 1511 mpegts_packetizer_pts_to_ts (packetizer, stream->pts, (gdb) bt )
Created attachment 226718 [details] [review] tsdemux: fix potential usage of NULL pointer
The backtrace was not added properly [Cambiando a Thread 0x7fffe8d32700 (LWP 26261)] 0x00007fffe8023e34 in gst_ts_demux_push_pending_data (demux=0x7fffed77ea80, stream=0x7fffe4055e00) at tsdemux.c:1511 1511 mpegts_packetizer_pts_to_ts (packetizer, stream->pts, (gdb) bt
+ Trace 231060
I wonder if we also need to free stream->data like in the previous if block then? (which on a side note I would have expected to also reset the state to something else, but I don't know the code that well, so maybe not)
Created attachment 226749 [details] [review] tsdemux: fix potential usage of NULL pointer Rght, this need to be free'd too.
Thanks, pushed: commit f768dfd92592ad3714c2ee8b18893792890fcbb0 Author: Andoni Morales Alastruey <ylatuya@gmail.com> Date: Thu Oct 18 01:47:57 2012 +0200 tsdemux: fix potential crash dereferencing NULL program pointer https://bugzilla.gnome.org/show_bug.cgi?id=686358