mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-24 18:51:11 +00:00
opus: reject major version number above what we grok
This commit is contained in:
parent
62d6c08148
commit
221a840eb8
1 changed files with 5 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue