]> git.ipfire.org Git - thirdparty/qemu.git/commit
audio: fix SIGSEGV in AUD_get_buffer_size_out()
authorVolker Rümelin <vr_qemu@t-online.de>
Thu, 15 May 2025 05:44:24 +0000 (07:44 +0200)
committerMichael Tokarev <mjt@tls.msk.ru>
Thu, 5 Jun 2025 12:09:53 +0000 (15:09 +0300)
commit47ddae806b9272959965f05b72187bdc933c7d96
treecc4d0595d097bcd67ca6063e9c517578fc22bb77
parentc3e1181bafaecbcf9deae6a8bb4ad3586e221a3d
audio: fix SIGSEGV in AUD_get_buffer_size_out()

As far as the emulated audio devices are concerned the pointer
returned by AUD_open_out() is an opaque handle. This includes
the NULL pointer. In this case, AUD_get_buffer_size_out() should
return a sensible buffer size instead of triggering a segmentation
fault. All other public AUD_*_out() and audio_*_out() functions
handle this case.

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Volker Rümelin <vr_qemu@t-online.de>
Message-Id: <20250515054429.7385-2-vr_qemu@t-online.de>
(cherry picked from commit 5ddd6c8dc849b4af44bd06840c9133d64e62c27c)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
audio/audio.c