From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49376) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VAfvm-0000bX-1d for qemu-devel@nongnu.org; Sat, 17 Aug 2013 08:48:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VAfvf-00018s-R1 for qemu-devel@nongnu.org; Sat, 17 Aug 2013 08:48:33 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40529) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VAfvf-00018i-IB for qemu-devel@nongnu.org; Sat, 17 Aug 2013 08:48:27 -0400 Message-ID: <520F7119.20708@redhat.com> Date: Sat, 17 Aug 2013 06:48:25 -0600 From: Eric Blake MIME-Version: 1.0 References: <1376659114-6630-1-git-send-email-armbru@redhat.com> <1376659114-6630-5-git-send-email-armbru@redhat.com> In-Reply-To: <1376659114-6630-5-git-send-email-armbru@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ke6hpNFe3VBn5uVs7K8RcGGsxskvlcsSj" Subject: Re: [Qemu-devel] [PATCH v2 4/7] smbios: Make multiple -smbios type= accumulate sanely List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: armbru@redhat.com Cc: aliguori@us.ibm.com, lersek@redhat.com, qemu-devel@nongnu.org, ehabkost@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --ke6hpNFe3VBn5uVs7K8RcGGsxskvlcsSj Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 08/16/2013 07:18 AM, armbru@redhat.com wrote: > From: Markus Armbruster >=20 > Currently, -smbios type=3DT,NAME=3DVAL,... adds one field (T,NAME) with= > value VAL to fw_cfg for each unique NAME. If NAME occurs multiple > times, the last one's VAL is used (before the QemuOpts conversion, the > first one was used). >=20 > + > + val =3D qemu_opt_get(opts, "release"); > + if (val) { > + if (sscanf(val, "%hhu.%hhu", &type0.major, &type0.mino= r) !=3D 2) { > + error_report("Invalid release"); As in v1, I'm not a fan of using sscanf for integer parsing (it has undefined behavior if the user provides a value that overflows the destination type); but as this is code motion, it does not invalidate my review. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --ke6hpNFe3VBn5uVs7K8RcGGsxskvlcsSj Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.14 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJSD3EZAAoJEKeha0olJ0NqoX4H/0VGUQXpCQOqo7wO+2R5g0Yz Vl4p0qMi4h5UXZB4QrCj7pGWeInC5QBdGVj+bNF8MA3Ej6zPYigx8lVt+N0qKmHO hrOFzi3f1W8ustcrsIB6PjGbLSM8CSD3hAzlvemftjX9jDNEv+q4fNxTwVxWprMw KdGRHNXRnv3gO1YUyBDx6VJsYl5QruNxiOY824akC3kAN7MmeSaNerrbCC6QIO7S lH1vSjCHslxMOkTxQPCee8IXfNPp4/86Bne4h/15pZanI/9YnCF/9uNHmNr11fRm uidrjVQ7J/KagnzRqX+CAtCeQzDtQnaWJdaRifu3U5BndCmvZvHETgz26DrM6CM= =feys -----END PGP SIGNATURE----- --ke6hpNFe3VBn5uVs7K8RcGGsxskvlcsSj--