[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 6/9] ossaudio: prevent SIGSEGV in oss_enable_out
From: |
Volker Rümelin |
Subject: |
[PATCH 6/9] ossaudio: prevent SIGSEGV in oss_enable_out |
Date: |
Thu, 23 Jan 2020 08:49:40 +0100 |
With audiodev parameter out.mixing-engine=off hw->mix_buf is
NULL. This patch reverts a small part of dc88e38fa7 "audio:
unify input and output mixeng buffer management".
To reproduce the problem start qemu with
-audiodev oss,id=audio0,try-mmap=on,out.mixing-engine=off
Signed-off-by: Volker Rümelin <address@hidden>
---
audio/ossaudio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/audio/ossaudio.c b/audio/ossaudio.c
index 4965084a5a..6a3b78b381 100644
--- a/audio/ossaudio.c
+++ b/audio/ossaudio.c
@@ -592,7 +592,7 @@ static void oss_enable_out(HWVoiceOut *hw, bool enable)
return;
}
- audio_pcm_info_clear_buf(&hw->info, hw->buf_emul, hw->mix_buf->size);
+ audio_pcm_info_clear_buf(&hw->info, hw->buf_emul, hw->samples);
trig = PCM_ENABLE_OUTPUT;
if (ioctl(oss->fd, SNDCTL_DSP_SETTRIGGER, &trig) < 0) {
oss_logerr(errno,
--
2.16.4
- [PATCH 0/9] more audio fixes and improvements, Volker Rümelin, 2020/01/23
- [PATCH 1/9] audio: fix audio_generic_write, Volker Rümelin, 2020/01/23
- [PATCH 2/9] audio: fix audio_generic_read, Volker Rümelin, 2020/01/23
- [PATCH 3/9] paaudio: remove unused variables, Volker Rümelin, 2020/01/23
- [PATCH 5/9] audio: fix bug 1858488, Volker Rümelin, 2020/01/23
- [PATCH 4/9] audio: prevent SIGSEGV in AUD_get_buffer_size_out, Volker Rümelin, 2020/01/23
- [PATCH 7/9] ossaudio: prevent SIGPFE in oss_write, Volker Rümelin, 2020/01/23
- [PATCH 6/9] ossaudio: prevent SIGSEGV in oss_enable_out,
Volker Rümelin <=
- [PATCH 8/9] ossaudio: disable poll mode can't be reached, Volker Rümelin, 2020/01/23
- [PATCH 9/9] audio: audio_generic_get_buffer_in should honor *size, Volker Rümelin, 2020/01/23
- Re: [PATCH 0/9] more audio fixes and improvements, Mark Cave-Ayland, 2020/01/27