diff options
author | Vincent Penquerc'h <vincent.penquerch@collabora.co.uk> | 2012-05-24 22:12:56 +0100 |
---|---|---|
committer | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2012-06-26 12:49:14 +0200 |
commit | bd577f57294ffd0424401095e28fb654a0bdb5f8 (patch) | |
tree | 01206355c0728a9c3a2bc0d3fef7478609585297 /ext | |
parent | ffb3f8ffd9a250e7fa489d8ac58a5eb33988c385 (diff) |
opus: reject major version number above what we grok
Diffstat (limited to 'ext')
-rw-r--r-- | ext/opus/gstopusheader.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ext/opus/gstopusheader.c b/ext/opus/gstopusheader.c index dc9954f88..597808d12 100644 --- a/ext/opus/gstopusheader.c +++ b/ext/opus/gstopusheader.c @@ -219,12 +219,15 @@ gst_opus_header_is_id_header (GstBuffer * buf) { gsize size = GST_BUFFER_SIZE (buf); const guint8 *data = GST_BUFFER_DATA (buf); - guint8 channels, channel_mapping_family, n_streams, n_stereo_streams; + guint8 version, channels, channel_mapping_family, n_streams, n_stereo_streams; if (size < 19) return FALSE; if (!gst_opus_header_is_header (buf, "OpusHead", 8)) return FALSE; + version = data[8]; + if (version >= 0x0f) /* major version >=0 is what we grok */ + return FALSE; channels = data[9]; if (channels == 0) return FALSE; |