oss4: Maximum number of channels support is 8

Avoids doing potential overwrites in ch_layout (which only has 8
fields).

CID #1139826
This commit is contained in:
Edward Hervey 2014-04-13 09:03:41 +02:00
parent 7c006edf8d
commit da39a0bae7

View file

@ -271,7 +271,7 @@ gst_oss4_audio_set_ringbuffer_channel_layout (GstObject * obj, gint fd,
GstAudioChannelPosition ch_layout[8] = { 0, };
num_channels = GST_AUDIO_INFO_CHANNELS (&spec->info);
if (num_channels < 3 || num_channels > 9)
if (num_channels < 3 || num_channels > 8)
return;
if (spec->type != GST_AUDIO_RING_BUFFER_FORMAT_TYPE_RAW)