From da39a0bae7140316c0a7ddd1534b47e7ecdd6f27 Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Sun, 13 Apr 2014 09:03:41 +0200 Subject: [PATCH] oss4: Maximum number of channels support is 8 Avoids doing potential overwrites in ch_layout (which only has 8 fields). CID #1139826 --- sys/oss4/oss4-audio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/oss4/oss4-audio.c b/sys/oss4/oss4-audio.c index 56d12b15e6..0896081d78 100644 --- a/sys/oss4/oss4-audio.c +++ b/sys/oss4/oss4-audio.c @@ -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) -- 2.34.1