opus: reject major version number above what we grok

This commit is contained in:
Vincent Penquerc'h 2012-05-24 22:12:56 +01:00
parent 62d6c08148
commit 221a840eb8

View file

@ -231,7 +231,7 @@ gst_opus_header_is_id_header (GstBuffer * buf)
{
gsize size = gst_buffer_get_size (buf);
guint8 *data = NULL;
guint8 channels, channel_mapping_family, n_streams, n_stereo_streams;
guint8 version, channels, channel_mapping_family, n_streams, n_stereo_streams;
gboolean ret = FALSE;
GstMapInfo map;
@ -244,6 +244,10 @@ gst_opus_header_is_id_header (GstBuffer * buf)
data = map.data;
size = map.size;
version = data[8];
if (version >= 0x0f) /* major version >=0 is what we grok */
goto beach;
channels = data[9];
if (channels == 0)