[pulseaudio-discuss] [PATCH 1/2] alsa-mixer: Fix reference to too high channel numbers

David Henningsson david.henningsson at canonical.com
Tue Mar 1 10:41:55 UTC 2016


The volume_use is set to ignore, but we continue the volume parsing
code, potentially referencing somewhere outside the array (which has
max two channels).

Signed-off-by: David Henningsson <david.henningsson at canonical.com>
---
 src/modules/alsa/alsa-mixer.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/modules/alsa/alsa-mixer.c b/src/modules/alsa/alsa-mixer.c
index 1fe2a02..c0ab1ba 100644
--- a/src/modules/alsa/alsa-mixer.c
+++ b/src/modules/alsa/alsa-mixer.c
@@ -1768,6 +1768,7 @@ static int element_probe(pa_alsa_element *e, snd_mixer_t *m) {
                          * channels... */
                         pa_log_warn("Volume element %s has %u channels. That's too much! I can't handle that!", e->alsa_name, e->n_channels);
                         e->volume_use = PA_ALSA_VOLUME_IGNORE;
+                        e->n_channels = 2;
                     }
 
                     if (!e->override_map) {
-- 
2.7.0



More information about the pulseaudio-discuss mailing list