mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-30 13:41:48 +00:00
matroskademux: avoid NULL access when checking subtitle
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=680388
This commit is contained in:
parent
538c131b37
commit
7e9dffa226
1 changed files with 3 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue