alsa-lib/src/pcm
Brendan Shanks 7cea8c1562 pcm: dshare: Fix overflow when slave_hw_ptr rolls over boundary
In snd_pcm_dshare_sync_area() when 'slave_hw_ptr' rolls over
'slave_boundary', the wrong variable is checked ('dshare->slave_hw_ptr' vs
the local 'slave_hw_ptr'). In some cases, this results in 'slave_hw_ptr'
not rolling over correctly. 'slave_size' and 'size' are then much too
large, and the for loop blocks for several minutes copying samples.

This was likely only triggered on 32-bit systems, since the PCM boundary
is computed based on LONG_MAX and is much larger on 64-bit systems.

This same change was made to pcm_dmix in commit
6c7f60f7a9 ("Fix boundary overlap”) from
June 2005.

Signed-off-by: Brendan Shanks <brendan.shanks@teradek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-02-12 14:37:44 +01:00
..
scopes Change FSF address (Franklin Street) 2017-11-14 14:29:26 +01:00
interval.c pcm: snd_interval_refine_first/last: exclude value only if also excluded before 2018-07-03 12:47:32 +02:00
interval.h Change FSF address (Franklin Street) 2017-11-14 14:29:26 +01:00
interval_inline.h pcm: interval: Interpret (x x+1] correctly and return x+1 2018-10-24 12:07:33 +02:00
ladspa.h big ALSA LADSPA plugin rewrite for multiple channel LADSPA plugins 2005-12-13 14:08:58 +00:00
Makefile.am pcm: Remove home brew atomic operations 2016-07-11 15:25:30 +02:00
mask.c Change FSF address (Franklin Street) 2017-11-14 14:29:26 +01:00
mask.h Change FSF address (Franklin Street) 2017-11-14 14:29:26 +01:00
mask_inline.h Change FSF address (Franklin Street) 2017-11-14 14:29:26 +01:00
pcm.c pcm: Skip avail_min check during draining 2018-03-29 09:23:46 +02:00
pcm_adpcm.c Change FSF address (Franklin Street) 2017-11-14 14:29:26 +01:00
pcm_alaw.c Change FSF address (Franklin Street) 2017-11-14 14:29:26 +01:00
pcm_asym.c Set PCM name properly in empty and asym plugins 2007-11-26 12:29:37 +01:00
pcm_copy.c Change FSF address (Franklin Street) 2017-11-14 14:29:26 +01:00
pcm_direct.c pcm: dmix: Add option to allow alignment of slave pointers 2018-11-13 15:18:40 +01:00
pcm_direct.h pcm: dmix: Add option to allow alignment of slave pointers 2018-11-13 15:18:40 +01:00
pcm_dmix.c pcm: dmix: Add option to allow alignment of slave pointers 2018-11-13 15:18:40 +01:00
pcm_dmix_generic.c Introduce bswap.h for portable definitions of byte swap macros. 2016-03-03 16:18:10 +01:00
pcm_dmix_i386.c pcm: dmix: Allow disabling x86 optimizations 2017-02-10 12:16:12 +01:00
pcm_dmix_i386.h Change FSF address (Franklin Street) 2017-11-14 14:29:26 +01:00
pcm_dmix_x86_64.c pcm: dmix: Allow disabling x86 optimizations 2017-02-10 12:16:12 +01:00
pcm_dmix_x86_64.h Change FSF address (Franklin Street) 2017-11-14 14:29:26 +01:00
pcm_dshare.c pcm: dshare: Fix overflow when slave_hw_ptr rolls over boundary 2019-02-12 14:37:44 +01:00
pcm_dsnoop.c Change FSF address (Franklin Street) 2017-11-14 14:29:26 +01:00
pcm_empty.c Change FSF address (Franklin Street) 2017-11-14 14:29:26 +01:00
pcm_ext_parm.h pcm: extplug: Keep format and channels the same if requested 2018-12-10 11:53:41 +01:00
pcm_extplug.c pcm: extplug: Keep format and channels the same if requested 2018-12-10 11:53:41 +01:00
pcm_file.c Change FSF address (Franklin Street) 2017-11-14 14:29:26 +01:00
pcm_generic.c Change FSF address (Franklin Street) 2017-11-14 14:29:26 +01:00
pcm_generic.h Change FSF address (Franklin Street) 2017-11-14 14:29:26 +01:00
pcm_hooks.c core: Proper reference of internal snd_dlopen() 2018-01-04 15:29:57 +01:00
pcm_hw.c pcm: Preserve period_event in snd_pcm_hw_sw_params() call 2019-01-09 12:02:56 +01:00
pcm_iec958.c Change FSF address (Franklin Street) 2017-11-14 14:29:26 +01:00
pcm_ioplug.c pcm: ioplug: Fix the regression of pulse plugin drain 2018-12-19 14:23:38 +01:00
pcm_ladspa.c Change FSF address (Franklin Street) 2017-11-14 14:29:26 +01:00
pcm_lfloat.c Change FSF address (Franklin Street) 2017-11-14 14:29:26 +01:00
pcm_linear.c pcm: linear, route: handle linear formats with 20-bit sample on 4 bytes 2017-12-18 15:41:08 +01:00
pcm_local.h pcm: ioplug: Provide hw_avail helper function for plugins 2018-03-13 22:12:02 +01:00
pcm_meter.c core: Proper reference of internal snd_dlopen() 2018-01-04 15:29:57 +01:00
pcm_misc.c pcm: add and describe SND_PCM_FORMAT_{S, U}20 2017-12-18 15:40:36 +01:00
pcm_mmap.c a set of fixes to reduce gcc warnings 2018-03-27 15:16:41 +02:00
pcm_mmap_emul.c Change FSF address (Franklin Street) 2017-11-14 14:29:26 +01:00
pcm_mulaw.c Change FSF address (Franklin Street) 2017-11-14 14:29:26 +01:00
pcm_multi.c Change FSF address (Franklin Street) 2017-11-14 14:29:26 +01:00
pcm_null.c Change FSF address (Franklin Street) 2017-11-14 14:29:26 +01:00
pcm_params.c pcm: Define refine mask bits explicitly (and fix missing DSD support) 2018-06-28 07:59:46 +02:00
pcm_plug.c pcm: plug: add SND_PCM_FORMAT_{S, U}20 to linear_preferred_formats 2017-12-18 15:41:29 +01:00
pcm_plugin.c a set of fixes to reduce gcc warnings 2018-03-27 15:16:41 +02:00
pcm_plugin.h Change FSF address (Franklin Street) 2017-11-14 14:29:26 +01:00
pcm_rate.c pcm: rate: Add error check for snd_pcm_avail_update() 2018-07-04 15:41:21 +02:00
pcm_rate_linear.c Change FSF address (Franklin Street) 2017-11-14 14:29:26 +01:00
pcm_route.c pcm: linear, route: handle linear formats with 20-bit sample on 4 bytes 2017-12-18 15:41:08 +01:00
pcm_share.c Change FSF address (Franklin Street) 2017-11-14 14:29:26 +01:00
pcm_shm.c Change FSF address (Franklin Street) 2017-11-14 14:29:26 +01:00
pcm_simple.c Change FSF address (Franklin Street) 2017-11-14 14:29:26 +01:00
pcm_softvol.c pcm: softvol: use position offset macro of TLV data 2018-05-15 18:03:13 +02:00
pcm_symbols.c Change FSF address (Franklin Street) 2017-11-14 14:29:26 +01:00
plugin_ops.h pcm: fix wrong comments for some cases of linear interpolation of PCM samples 2017-12-22 10:23:42 +01:00