From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56201) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dZz2c-00010G-8F for qemu-devel@nongnu.org; Tue, 25 Jul 2017 08:34:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dZz2X-0006Et-CA for qemu-devel@nongnu.org; Tue, 25 Jul 2017 08:34:22 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50982) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dZz2X-0006EJ-5y for qemu-devel@nongnu.org; Tue, 25 Jul 2017 08:34:17 -0400 Message-ID: <1500986052.29790.5.camel@redhat.com> From: Gerd Hoffmann Date: Tue, 25 Jul 2017 14:34:12 +0200 In-Reply-To: <20170724182751.18261-17-f4bug@amsat.org> References: <20170724182751.18261-1-f4bug@amsat.org> <20170724182751.18261-17-f4bug@amsat.org> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH for 2.10 16/35] usb/dev-mtp: fix use of uninitialized values List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Philippe =?ISO-8859-1?Q?Mathieu-Daud=E9?= , Eric Blake , =?ISO-8859-1?Q?Marc-Andr=E9?= Lureau Cc: qemu-devel@nongnu.org =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0case CMD_GET_OBJECT_INFO: > -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0o =3D usb_mtp_object_l= ookup(s, c->argv[0]); > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0if (c->argc > 0) { > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= o =3D usb_mtp_object_lookup(s, c->argv[0]); > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0} How about zero-initializing c->argv instead? cheers, Gerd