aboutsummaryrefslogtreecommitdiff
path: root/qemu-keymap.c
diff options
context:
space:
mode:
authorNicholas Piggin <npiggin@gmail.com>2024-08-28 14:33:34 +1000
committerMarc-André Lureau <marcandre.lureau@redhat.com>2024-12-03 16:09:19 +0400
commit651b386205d7578e8de60df0ec3830b315f6686f (patch)
treeadbb20f03edbff8a718029568a5f484abd8b4a64 /qemu-keymap.c
parenteb22a064455aeebc105cc89bf77f48aa18b52938 (diff)
downloadqemu-651b386205d7578e8de60df0ec3830b315f6686f.zip
qemu-651b386205d7578e8de60df0ec3830b315f6686f.tar.gz
qemu-651b386205d7578e8de60df0ec3830b315f6686f.tar.bz2
chardev: Fix record/replay error path NULL deref in device creation
qemu_chardev_set_replay() was being called in chardev creation to set up replay parameters even if the chardev is NULL. A segfault can be reproduced by specifying '-serial chardev:bad' with an rr=record mode. Fix this with a NULL pointer check. Reported-by: Peter Maydell <peter.maydell@linaro.org> Resolves: Coverity CID 1559470 Fixes: 4c193bb129dae ("chardev: set record/replay on the base device of a muxed device") Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-ID: <20240828043337.14587-2-npiggin@gmail.com>
Diffstat (limited to 'qemu-keymap.c')
0 files changed, 0 insertions, 0 deletions