From: Giovanni Mascellani <gmascellani@codeweavers.com> This can happen if nSamplesPerSec is too small, and it leads to a crash. --- dlls/winecoreaudio.drv/coreaudio.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/dlls/winecoreaudio.drv/coreaudio.c b/dlls/winecoreaudio.drv/coreaudio.c index da2ae2dd67b..3957cf40cf4 100644 --- a/dlls/winecoreaudio.drv/coreaudio.c +++ b/dlls/winecoreaudio.drv/coreaudio.c @@ -742,6 +742,13 @@ static NTSTATUS unix_create_stream(void *args) stream->period = params->period; stream->period_frames = muldiv(params->period, stream->fmt->nSamplesPerSec, 10000000); + + if (stream->period_frames == 0) + { + params->result = E_INVALIDARG; + goto end; + } + stream->dev_id = dev_id_from_device(params->device); stream->flow = params->flow; stream->flags = params->flags; -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/9749