alsa-project/alsa-plugins issue #16 was edited from i-garrison:
Following up on this debian bug report https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=824850
Looks like this crash is caused by missing stream hole handling in pulse plugin. Pulseaudio change was done just before `pulseaudio-v3.0` release and this issue should be reproducible with all current versions: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/commit/dfd44036b54d65... quoting from there: ``` ... let the caller decide how the holes should be handled, so in case of holes, pa_stream_peek() will return NULL data pointer and the length of the hole in the nbytes argument ```
Here in pulse plugin, if there is a hole in stream `pa_stream_peek` would return NULL buffer pointer but non-zero `frag_length` and later memcpy is happily trying to copy from NULL source: https://github.com/alsa-project/alsa-plugins/blob/7028580da1db9a2362dd9b0631...
Instead, pulse plugin should detect there is a hole by checking if `src_buf` is still NULL while `frag_length` is not zero, and adjust transfer result accordingly.
Issue URL : https://github.com/alsa-project/alsa-plugins/issues/16 Repository URL: https://github.com/alsa-project/alsa-plugins