Commit 7e9dffa2 authored by Mark Nauwelaerts's avatar Mark Nauwelaerts

matroskademux: avoid NULL access when checking subtitle

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=680388
parent 538c131b
......@@ -2963,6 +2963,8 @@ gst_matroska_demux_subtitle_chunk_has_tag (GstElement * element,
{
gchar *tag;
g_return_val_if_fail (text != NULL, FALSE);
/* yes, this might all lead to false positives ... */
tag = (gchar *) text;
while ((tag = strchr (tag, '<'))) {
......@@ -3001,7 +3003,7 @@ gst_matroska_demux_check_subtitle_buffer (GstElement * element,
sub_stream = (GstMatroskaTrackSubtitleContext *) stream;
if (!gst_buffer_map (*buf, &map, GST_MAP_READ))
if (!gst_buffer_get_size (*buf) || !gst_buffer_map (*buf, &map, GST_MAP_READ))
return GST_FLOW_OK;
if (!sub_stream->invalid_utf8) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment