The Advanced Linux Sound Architecture (ALSA) - library
Find a file
Kirill Marinushkin d3dfef24bf pcm: dshare: Fix segfault when not binding channel 0
Configuration to reproduce:

~~~~
pcm.share_right {
  type dshare
  ipc_key 73
  ipc_perm 0666
  slave {
    pcm "hw:0,0"
  }
  bindings {
    # the seagfault happens when we don't bind channel 0
    1 1
  }
}
~~~~

Execute to reproduce:

~~~~
$ aplay -D plug:share_right test.wav
Playing WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
Segmentation fault
~~~~

For channels whithout binding, values are set to UINT_MAX in function
`snd_pcm_direct_parse_bindings()`:

~~~~
	for (chn = 0; chn < count; chn++)
		bindings[chn] = UINT_MAX;		/* don't route */
~~~~

But, these values are not checked when playing, which causes the segfault.

This commit fixes the issue.

Signed-off-by: Kirill Marinushkin <kmarinushkin@birdec.tech>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-11-21 11:01:21 +01:00
alsalisp Change FSF address (Franklin Street) 2017-11-14 14:29:26 +01:00
aserver a set of fixes to reduce gcc warnings 2018-03-27 15:16:41 +02:00
doc doxygen: Suppress timestamp 2016-06-23 16:29:07 +02:00
include ioplug: Fix comment in struct snd_pcm_ioplug 2018-10-02 17:56:51 +02:00
m4 Add the attributes.m4 macro file from xine/lscube. 2008-11-21 13:04:19 +01:00
modules modules: smixer_python - add support for python3 2018-03-27 14:51:39 +02:00
src pcm: dshare: Fix segfault when not binding channel 0 2018-11-21 11:01:21 +01:00
test test/audio_time: remove unused variables 2018-10-24 12:07:33 +02:00
utils utils/alsa.m4: conditionally enable libdl in AM_PATH_ALSA m4 macro 2018-11-02 14:57:50 +01:00
.gitignore initial version of .travis.yml file 2018-10-24 16:07:58 +02:00
.travis.yml initial version of .travis.yml file 2018-10-24 16:07:58 +02:00
acinclude.m4 fixed for the recent autoconf. 2004-01-26 15:52:17 +00:00
ChangeLog * update to libtool 1.3.3 1999-07-22 12:18:42 +00:00
configure.ac Release v1.1.7 2018-10-16 10:08:35 +02:00
COPYING Change FSF address (Franklin Street) 2017-11-14 14:29:26 +01:00
gitcompile a set of fixes to reduce gcc warnings 2018-03-27 15:16:41 +02:00
INSTALL pcm: Add thread-safety to PCM API 2016-07-11 15:25:30 +02:00
Makefile.am autotools: update style 2014-02-26 08:16:22 +01:00
MEMORY-LEAK Initial version 2003-02-04 14:56:07 +00:00
NOTES Change assert condition in error message handler 2007-10-24 12:53:08 +02:00
README.md README.md: add link to www.alsa-project.org 2018-10-24 17:33:10 +02:00
TODO Added snd_config_load_override(). 2002-01-09 21:28:15 +00:00

alsa-lib

Advanced Linux Sound Architecture (ALSA) project

The alsa-lib is a library to interface with ALSA in the Linux kernel and virtual devices using a plugin system.

The up-to-date reference generated from sources can be accessed here:

http://www.alsa-project.org/alsa-doc/alsa-lib/

You may give a look for more information about the ALSA project to URL http://www.alsa-project.org.