diff options
author | Edward Hervey <edward@centricular.com> | 2016-11-25 10:07:35 +0100 |
---|---|---|
committer | Edward Hervey <bilboed@bilboed.com> | 2016-11-25 10:08:31 +0100 |
commit | 4a52e6c827b30dc34fb177c6362ce02f1068e718 (patch) | |
tree | 993046e53e7370f8ea4c2251a89e2aa7ad630f31 | |
parent | 8f05e8f44979c84aaf06f0c817e76eb44b28de50 (diff) |
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
-rw-r--r-- | gst/asfdemux/gstasfdemux.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gst/asfdemux/gstasfdemux.c b/gst/asfdemux/gstasfdemux.c index 8d9dfeff..e1d62739 100644 --- a/gst/asfdemux/gstasfdemux.c +++ b/gst/asfdemux/gstasfdemux.c @@ -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; } |