hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/sound/synth/emux/emux_nrpn.c
....@@ -349,6 +349,9 @@
349349 snd_emux_xg_control(struct snd_emux_port *port, struct snd_midi_channel *chan,
350350 int param)
351351 {
352
+ if (param >= ARRAY_SIZE(chan->control))
353
+ return -EINVAL;
354
+
352355 return send_converted_effect(xg_effects, ARRAY_SIZE(xg_effects),
353356 port, chan, param,
354357 chan->control[param],