mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-10-06 02:32:23 +00:00
asfdemux: Add sanity check for asf_stream_audio
We should have enough bytes for the specified codec_data https://bugzilla.gnome.org/show_bug.cgi?id=775070
This commit is contained in:
parent
8f05e8f449
commit
4a52e6c827
1 changed files with 5 additions and 0 deletions
|
@ -2507,6 +2507,11 @@ gst_asf_demux_get_stream_audio (asf_stream_audio * audio, guint8 ** p_data,
|
|||
audio->word_size = gst_asf_demux_get_uint16 (p_data, p_size);
|
||||
/* Codec specific data size */
|
||||
audio->size = gst_asf_demux_get_uint16 (p_data, p_size);
|
||||
if (audio->size > *p_size) {
|
||||
GST_WARNING ("Corrupted audio codec_data (should be at least %u bytes, is %"
|
||||
G_GUINT64_FORMAT " long)", audio->size, *p_size);
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue