]> git.ipfire.org Git - thirdparty/qemu.git/commit
hw/audio/asc: fix SIGSEGV in asc_realize()
authorVolker Rümelin <vr_qemu@t-online.de>
Thu, 15 May 2025 05:44:26 +0000 (07:44 +0200)
committerMichael Tokarev <mjt@tls.msk.ru>
Thu, 5 Jun 2025 12:10:42 +0000 (15:10 +0300)
commit92d08b3c0d19467e2bb6ea079aba82c1e6ead9f5
tree6e6ca383c44b00a4d8394b90d73124fec3bb1c26
parent6b12cb6edc09fa28429e72af12517e45b6c7c734
hw/audio/asc: fix SIGSEGV in asc_realize()

AUD_open_out() may fail and return NULL. This may then lead to
a segmentation fault in memset() below. The memset() behaviour
is undefined if the pointer to the destination object is a null
pointer.

Add the missing error handling code.

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Volker Rümelin <vr_qemu@t-online.de>
Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Message-Id: <20250515054429.7385-4-vr_qemu@t-online.de>
(cherry picked from commit d009f26a54f573468be721590a19350c224bc730)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
hw/audio/asc.c