]> git.alsa-project.org Git - alsa-tools.git/commit
hdspmixer: Fix ALSA snd_ctl_open error when running with three cards.
authorAdrian Knoth <adi@drcomp.erfurt.thur.de>
Thu, 24 Feb 2011 20:33:30 +0000 (21:33 +0100)
committerTakashi Iwai <tiwai@suse.de>
Mon, 28 Feb 2011 10:11:13 +0000 (11:11 +0100)
commit97e96addffef14f71739bdf1e51030cce854904b
tree84356a6f59eff7a3618c0699b0018ff9987bc882
parent3506d3d9a7d13c40f8080bf36e2c745a73310da9
hdspmixer: Fix ALSA snd_ctl_open error when running with three cards.

If three (or more) RME cards are installed in one box, hdspmixer will
try to open a non-existing 4th card, causing an error in snd_ctl_open
and finally terminates itself.

cards[] is a static array, and one must not read beyond the last
element. The solution is far from elegant, however, it's a rather
unintrusive change.

Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
hdspmixer/src/HDSPMixerWindow.cxx
hdspmixer/src/HDSPMixerWindow.h
hdspmixer/src/defines.h