Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE
alsa.6660
0021-pcm-multi-Drop-the-fixed-slave_map-in-snd_...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0021-pcm-multi-Drop-the-fixed-slave_map-in-snd_pcm_multi_.patch of Package alsa.6660
From e1143dd9ba350eb19d13d4e298eeb55179712a1e Mon Sep 17 00:00:00 2001 From: Takashi Iwai <tiwai@suse.de> Date: Fri, 27 Jan 2017 12:01:51 +0100 Subject: [PATCH 21/43] pcm: multi: Drop the fixed slave_map[] in snd_pcm_multi_open() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit slave_map[] in snd_pcm_multi_open() is a fixed size array and obviously we have no overflow check, and eventually the program gets an error when more than 64 channels are used. Although we can modify the code to allocate the array dynamically, it turned out that we can drop the whole slave_map[] thingy in this function when looking at the code closely. In the past, it was used to identify the one-to-many mapping. But the check was dropped, and now it's nothing more than a sanity check. Reported-by: Jörg Müller <joerg.mueller7744@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> --- src/pcm/pcm_multi.c | 3 --- 1 file changed, 3 deletions(-) --- a/src/pcm/pcm_multi.c +++ b/src/pcm/pcm_multi.c @@ -1015,7 +1015,6 @@ int snd_pcm_multi_open(snd_pcm_t **pcmp, snd_pcm_multi_t *multi; unsigned int i; snd_pcm_stream_t stream; - char slave_map[64][64] = { { 0 } }; int err; assert(pcmp); @@ -1059,8 +1058,6 @@ int snd_pcm_multi_open(snd_pcm_t **pcmp, bind->slave_channel = schannels[i]; if (sidxs[i] < 0) continue; - assert(!slave_map[sidxs[i]][schannels[i]]); - slave_map[sidxs[i]][schannels[i]] = 1; } multi->channels_count = channels_count;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor