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
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