From: Giovanni Mascellani <gmascellani@codeweavers.com> This can happen if nSamplesPerSec is too small, and it leads to a crash. --- dlls/winealsa.drv/alsa.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dlls/winealsa.drv/alsa.c b/dlls/winealsa.drv/alsa.c index aea4ddfa326..0fcf180d856 100644 --- a/dlls/winealsa.drv/alsa.c +++ b/dlls/winealsa.drv/alsa.c @@ -882,6 +882,12 @@ static NTSTATUS alsa_create_stream(void *args) stream->mmdev_period_frames = muldiv(params->fmt->nSamplesPerSec, stream->mmdev_period_rt, 10000000); + if (stream->mmdev_period_frames == 0) + { + params->result = E_INVALIDARG; + goto exit; + } + /* Buffer 4 ALSA periods if large enough, else 4 mmdevapi periods */ stream->alsa_bufsize_frames = stream->mmdev_period_frames * 4; if(err < 0 || alsa_period_us < params->period / 10) -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/9749