[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 16/16] chardev: ensure termios is fully initi
From: |
Marc-André Lureau |
Subject: |
Re: [Qemu-devel] [PATCH v2 16/16] chardev: ensure termios is fully initialized |
Date: |
Mon, 4 Feb 2019 11:20:42 +0100 |
On Wed, Jan 23, 2019 at 6:29 PM Daniel P. Berrangé <address@hidden> wrote:
>
> valgrind on the test-char.c code reports that 'struct termios' contains
> uninitialized memory.
>
> Signed-off-by: Daniel P. Berrangé <address@hidden>
Reviewed-by: Marc-André Lureau <address@hidden>
> ---
> chardev/char-serial.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/chardev/char-serial.c b/chardev/char-serial.c
> index 3299b46853..a8bae31b8d 100644
> --- a/chardev/char-serial.c
> +++ b/chardev/char-serial.c
> @@ -57,7 +57,7 @@ static void qmp_chardev_open_serial(Chardev *chr,
> static void tty_serial_init(int fd, int speed,
> int parity, int data_bits, int stop_bits)
> {
> - struct termios tty;
> + struct termios tty = {0};
> speed_t spd;
>
> #if 0
> --
> 2.20.1
>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Qemu-devel] [PATCH v2 16/16] chardev: ensure termios is fully initialized,
Marc-André Lureau <=