pcm: dshare: Fix segfault when not binding channel 0
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 <8f7c9495dabb8d6107fc05af31d608bd388d6f06@birdec.tech>
Signed-off-by: Takashi Iwai <4596b3305151c7ee743192a95d394341e3d3b644@suse.de>

takaswie/alsa-lib,takaswie/alsa-lib,takaswie/alsa-lib,alsa-project/alsa-lib,alsa-project/alsa-lib,tiwai/alsa-lib,takaswie/alsa-lib,tiwai/alsa-lib,tiwai/alsa-lib,takaswie/alsa-lib,tiwai/alsa-lib,alsa-project/alsa-lib,alsa-project/alsa-lib