<HTML><BODY><div><div><div>In snd_emux_control() method "snd_emux_port" can be passed with </div><div>field chset.midi_mode == SNDRV_MIDI_MODE_XG. The "type" can be </div><div>MIDI_CTL_PITCHBEND or MIDI_CTL_CHAN_PRESSURE.</div><div>It may lead to accessing 'control' array of size 128 with </div><div>MIDI_CTL_PITCHBEND (0x80) or MIDI_CTL_CHAN_PRESSURE (0x82) index.</div></div><div> </div><div><div>How can we prevent this? Would it be a good solution to place code like this </div><div>before call snd_emux_xg_control()?</div></div><div> </div><div><div>if (type == MIDI_CTL_PITCHBEND || type == MIDI_CTL_CHAN_PRESSURE){</div><div> return;</div><div>}</div></div><div> </div><div><div>Found by Linux Verification Center (linuxtesting.org) with SVACE.</div></div></div></BODY></HTML>