Skip to content
Permalink
Browse files Browse the repository at this point in the history
asfdemux: Check that we have enough data available before parsing boo…
…l/uint extended content descriptors

https://bugzilla.gnome.org/show_bug.cgi?id=777955
  • Loading branch information
sdroege committed Jan 31, 2017
1 parent dec8800 commit d21017b
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions gst/asfdemux/gstasfdemux.c
Expand Up @@ -3439,7 +3439,12 @@ gst_asf_demux_process_ext_content_desc (GstASFDemux * demux, guint8 * data,
break;
}
case ASF_DEMUX_DATA_TYPE_DWORD:{
guint uint_val = GST_READ_UINT32_LE (value);
guint uint_val;

if (value_len < 4)
break;

uint_val = GST_READ_UINT32_LE (value);

/* this is the track number */
g_value_init (&tag_value, G_TYPE_UINT);
Expand All @@ -3453,7 +3458,12 @@ gst_asf_demux_process_ext_content_desc (GstASFDemux * demux, guint8 * data,
}
/* Detect 3D */
case ASF_DEMUX_DATA_TYPE_BOOL:{
gboolean bool_val = GST_READ_UINT32_LE (value);
gboolean bool_val;

if (value_len < 4)
break;

bool_val = GST_READ_UINT32_LE (value);

if (strncmp ("Stereoscopic", name_utf8, strlen (name_utf8)) == 0) {
if (bool_val) {
Expand Down

0 comments on commit d21017b

Please sign in to comment.