Received: from eggs.gnu.org ([2001:4830:134:3::10]:56669) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bn4XQ-0004GN-6a for qemu-devel@nongnu.org; Thu, 22 Sep 2016 09:59:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bn4XN-0005EX-1d for qemu-devel@nongnu.org; Thu, 22 Sep 2016 09:59:44 -0400 References: <20160922130905.4720-1-marcandre.lureau@redhat.com> <20160922130905.4720-3-marcandre.lureau@redhat.com> From: Eric Blake Message-ID: <7fe25d07-f224-73f1-4752-55911d755fa7@redhat.com> Date: Thu, 22 Sep 2016 08:59:38 -0500 MIME-Version: 1.0 In-Reply-To: <20160922130905.4720-3-marcandre.lureau@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="CiLfEoaxl7Qsr2s2RMOca8JfQnJEqn4Go" Subject: Re: [Qemu-devel] [PATCH v2 2/3] qapi: fix crash when a parameter is missing List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?Q?Marc-Andr=c3=a9_Lureau?= , qemu-devel@nongnu.org Cc: paolo.bonzini@gmail.com, berrange@redhat.com, qemu-stable@nongnu.org, armbru@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --CiLfEoaxl7Qsr2s2RMOca8JfQnJEqn4Go From: Eric Blake To: =?UTF-8?Q?Marc-Andr=c3=a9_Lureau?= , qemu-devel@nongnu.org Cc: paolo.bonzini@gmail.com, berrange@redhat.com, qemu-stable@nongnu.org, armbru@redhat.com Message-ID: <7fe25d07-f224-73f1-4752-55911d755fa7@redhat.com> Subject: Re: [PATCH v2 2/3] qapi: fix crash when a parameter is missing References: <20160922130905.4720-1-marcandre.lureau@redhat.com> <20160922130905.4720-3-marcandre.lureau@redhat.com> In-Reply-To: <20160922130905.4720-3-marcandre.lureau@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 09/22/2016 08:09 AM, Marc-Andr=C3=A9 Lureau wrote: > Calling: >=20 > { "execute": "qom-set", > "arguments": { "path": "/machine", "property": "rtc-time" } } >=20 > Will crash with: >=20 > qapi/qapi-visit-core.c:277: visit_type_any: Assertion `!err !=3D !*obj'= > failed >=20 > Clear the obj and return an error. >=20 > The patch also fixes a similar potential crash in qmp_input_type_null()= > by checking qmp_input_get_object() returned a valid qobj. >=20 > Signed-off-by: Marc-Andr=C3=A9 Lureau > --- > qapi/qmp-input-visitor.c | 11 +++++++++++ > 1 file changed, 11 insertions(+) Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --CiLfEoaxl7Qsr2s2RMOca8JfQnJEqn4Go Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJX4+PKAAoJEKeha0olJ0NqIvMH/2L0U0YHYUrowiwbOrZ9X9mZ tHepBIs5ym6CabQ/JIqOYQ4NRjQsh+hqlZjR9DzH1NWzb4o9kJvWQhLmpMzkzBoW BCDRGjnjqESuCEnKVQCKSg/jLE6gBCkn2RHld2IBHT8Z21YqYoBBez5xIqac26/P foCcj0t5h/E7zj9AtzRTTZCHQlaD+MRZBAv9XGxOHYXCD6jdVFz7RPjl3J+clRDy kGy0D4zUnUVK6WDfJmZd+TR5qc+v9S36wIKcgvXMsTjYmlM0oFFsERxw6WaqGyW2 PBwh3HiHaV2uh20ZsWAOAe67yJRVmL8JcE7zpc07lkpwRO7rZ/DHVydF1STlhJA= =0eRJ -----END PGP SIGNATURE----- --CiLfEoaxl7Qsr2s2RMOca8JfQnJEqn4Go--