mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
asfdemux: Check that we have enough data available before parsing bool/uint extended content descriptors
https://bugzilla.gnome.org/show_bug.cgi?id=777955
This commit is contained in:
parent
dec880031d
commit
d21017b52a
1 changed files with 12 additions and 2 deletions
|
@ -3439,7 +3439,12 @@ gst_asf_demux_process_ext_content_desc (GstASFDemux * demux, guint8 * data,
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case ASF_DEMUX_DATA_TYPE_DWORD:{
|
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 */
|
/* this is the track number */
|
||||||
g_value_init (&tag_value, G_TYPE_UINT);
|
g_value_init (&tag_value, G_TYPE_UINT);
|
||||||
|
@ -3453,7 +3458,12 @@ gst_asf_demux_process_ext_content_desc (GstASFDemux * demux, guint8 * data,
|
||||||
}
|
}
|
||||||
/* Detect 3D */
|
/* Detect 3D */
|
||||||
case ASF_DEMUX_DATA_TYPE_BOOL:{
|
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 (strncmp ("Stereoscopic", name_utf8, strlen (name_utf8)) == 0) {
|
||||||
if (bool_val) {
|
if (bool_val) {
|
||||||
|
|
Loading…
Reference in a new issue