summaryrefslogtreecommitdiffstats
path: root/sound/synth/emux
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-08 04:15:15 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-08 04:15:15 +0000
commit68c1b0995e963349e50f8a8b00ebc140908f7882 (patch)
treeae3788542761985ee15e3d1ca439706040d1eb0c /sound/synth/emux
parentReleasing progress-linux version 4.19.269-1progress5u1. (diff)
downloadlinux-68c1b0995e963349e50f8a8b00ebc140908f7882.tar.xz
linux-68c1b0995e963349e50f8a8b00ebc140908f7882.zip
Merging upstream version 4.19.282.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'sound/synth/emux')
-rw-r--r--sound/synth/emux/emux_nrpn.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/synth/emux/emux_nrpn.c b/sound/synth/emux/emux_nrpn.c
index 9729a15b6..f4aa2706a 100644
--- a/sound/synth/emux/emux_nrpn.c
+++ b/sound/synth/emux/emux_nrpn.c
@@ -363,6 +363,9 @@ int
snd_emux_xg_control(struct snd_emux_port *port, struct snd_midi_channel *chan,
int param)
{
+ if (param >= ARRAY_SIZE(chan->control))
+ return -EINVAL;
+
return send_converted_effect(xg_effects, ARRAY_SIZE(xg_effects),
port, chan, param,
chan->control[param],