mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-03 04:52:28 +00:00
mpegdemux: check pointer before dereferencing
gst_ps_demux_get_stream() could return NULL when it is unknown stream, check this hasn't happened before dereferencing the returned pointer. https://bugzilla.gnome.org/show_bug.cgi?id=751528
This commit is contained in:
parent
e09cf2f3b6
commit
0ca354eb10
1 changed files with 5 additions and 0 deletions
5
gst/mpegdemux/gstmpegdemux.c
Normal file → Executable file
5
gst/mpegdemux/gstmpegdemux.c
Normal file → Executable file
|
@ -822,6 +822,9 @@ gst_ps_demux_handle_dvd_event (GstPsDemux * demux, GstEvent * event)
|
|||
continue;
|
||||
}
|
||||
|
||||
if (temp == NULL)
|
||||
continue;
|
||||
|
||||
g_snprintf (cur_stream_name, 32, "audio-%d-language", i);
|
||||
lang_code = gst_structure_get_string (structure, cur_stream_name);
|
||||
if (lang_code) {
|
||||
|
@ -855,6 +858,8 @@ gst_ps_demux_handle_dvd_event (GstPsDemux * demux, GstEvent * event)
|
|||
/* Retrieve the subpicture stream to force pad creation */
|
||||
temp = gst_ps_demux_get_stream (demux, 0x20 + stream_id,
|
||||
ST_PS_DVD_SUBPICTURE);
|
||||
if (temp == NULL)
|
||||
continue;
|
||||
|
||||
g_snprintf (cur_stream_name, 32, "subpicture-%d-language", i);
|
||||
lang_code = gst_structure_get_string (structure, cur_stream_name);
|
||||
|
|
Loading…
Reference in a new issue