Re: [PATCH 1/2] chardev: Fix record/replay error path NULL deref in device creation

2024-08-28 Thread Peter Maydell
On Wed, 28 Aug 2024 at 05:33, Nicholas Piggin wrote: > > 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

[PATCH 1/2] chardev: Fix record/replay error path NULL deref in device creation

2024-08-27 Thread Nicholas Piggin
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 Resolves: Coverity CID