From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:60543) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gqbN2-00062r-Lk for qemu-devel@nongnu.org; Mon, 04 Feb 2019 05:20:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gqbN1-0002NW-RD for qemu-devel@nongnu.org; Mon, 04 Feb 2019 05:20:56 -0500 Received: from mail-qt1-f194.google.com ([209.85.160.194]:34911) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gqbN1-0002M1-LO for qemu-devel@nongnu.org; Mon, 04 Feb 2019 05:20:55 -0500 Received: by mail-qt1-f194.google.com with SMTP id v11so14798322qtc.2 for ; Mon, 04 Feb 2019 02:20:54 -0800 (PST) MIME-Version: 1.0 References: <20190123172740.32452-1-berrange@redhat.com> <20190123172740.32452-17-berrange@redhat.com> In-Reply-To: <20190123172740.32452-17-berrange@redhat.com> From: =?UTF-8?B?TWFyYy1BbmRyw6kgTHVyZWF1?= Date: Mon, 4 Feb 2019 11:20:42 +0100 Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v2 16/16] chardev: ensure termios is fully initialized List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?Q?Daniel_P=2E_Berrang=C3=A9?= Cc: qemu-devel , Thomas Huth , Paolo Bonzini , Laurent Vivier , Yongji Xie On Wed, Jan 23, 2019 at 6:29 PM Daniel P. Berrang=C3=A9 wrote: > > valgrind on the test-char.c code reports that 'struct termios' contains > uninitialized memory. > > Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Marc-Andr=C3=A9 Lureau > --- > 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 =3D {0}; > speed_t spd; > > #if 0 > -- > 2.20.1 >