mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-30 13:41:48 +00:00
matroskademux: Ignore unexpected CodecState
Because GstMatroskaTrackContext *stream is set up in the first SimpleBlock or Block, a rogue CodecState otherwise causes a segfault on derefencing the NULL pointer. Test case: bug_s5506167_r0.001____gst_matroska_demux_parse_blockgroup_or_simpleblock.webm
This commit is contained in:
parent
9dc7889eea
commit
d146971128
1 changed files with 6 additions and 0 deletions
|
@ -4531,6 +4531,12 @@ gst_matroska_demux_parse_blockgroup_or_simpleblock (GstMatroskaDemux * demux,
|
||||||
&data_len)) != GST_FLOW_OK)
|
&data_len)) != GST_FLOW_OK)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
if (G_UNLIKELY (stream == NULL)) {
|
||||||
|
GST_WARNING_OBJECT (demux,
|
||||||
|
"Unexpected CodecState subelement - ignoring");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
g_free (stream->codec_state);
|
g_free (stream->codec_state);
|
||||||
stream->codec_state = data;
|
stream->codec_state = data;
|
||||||
stream->codec_state_size = data_len;
|
stream->codec_state_size = data_len;
|
||||||
|
|
Loading…
Reference in a new issue