mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-12 21:57:43 +00:00
staging: bcm2835-audio: off by one in snd_bcm2835_playback_open_generic()
The > should be >= otherwise we write beyond the end of the array when
we do:
chip->alsa_stream[idx] = alsa_stream;
Fixes: 23b028c871
("staging: bcm2835-audio: initial staging submission")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
1605cda06b
commit
84472ecd70
1 changed files with 1 additions and 1 deletions
|
@ -130,7 +130,7 @@ static int snd_bcm2835_playback_open_generic(
|
|||
err = -EBUSY;
|
||||
goto out;
|
||||
}
|
||||
if (idx > MAX_SUBSTREAMS) {
|
||||
if (idx >= MAX_SUBSTREAMS) {
|
||||
audio_error
|
||||
("substream(%d) device doesn't exist max(%d) substreams allowed\n",
|
||||
idx, MAX_SUBSTREAMS);
|
||||
|
|
Loading…
Reference in a new issue