From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56872) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VnXfa-0005FE-Rm for qemu-devel@nongnu.org; Mon, 02 Dec 2013 12:52:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VnXfW-0000hR-Dw for qemu-devel@nongnu.org; Mon, 02 Dec 2013 12:52:30 -0500 Received: from mx1.redhat.com ([209.132.183.28]:13082) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VnXfW-0000hF-4j for qemu-devel@nongnu.org; Mon, 02 Dec 2013 12:52:26 -0500 Message-ID: <529CC8D6.1050008@redhat.com> Date: Mon, 02 Dec 2013 10:52:22 -0700 From: Eric Blake MIME-Version: 1.0 References: <1385707735-6994-1-git-send-email-hare@suse.de> In-Reply-To: <1385707735-6994-1-git-send-email-hare@suse.de> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="cL7lxhqt7a9gxFfSD6hvBg8GjCEEJkQuW" Subject: Re: [Qemu-devel] [PATCHv4] qdev: Validate hex properties List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Hannes Reinecke , Andreas Faerber Cc: qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --cL7lxhqt7a9gxFfSD6hvBg8GjCEEJkQuW Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 11/28/2013 11:48 PM, Hannes Reinecke wrote: > strtoul(l) might overflow, in which case it'll return '-1' and set > the appropriate error code. So update the calls to strtoul(l) when > parsing hex properties to avoid silent overflows. > And we should be using an intermediate variable to avoid clobbering > of the passed-in point on error. >=20 > Signed-off-by: Hannes Reinecke > --- > hw/core/qdev-properties.c | 36 ++++++++++++++++++++++++++++++------ > 1 file changed, 30 insertions(+), 6 deletions(-) Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --cL7lxhqt7a9gxFfSD6hvBg8GjCEEJkQuW 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.15 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJSnMjWAAoJEKeha0olJ0NqBxYH/07WYSFULERf1xW48G5kvkPV z4it3HVWbtm1O7a0XsUWTqUdMhReE2OnGvOMzn/XerAtNgG/KFkLxJWo9ZJ8yeqs +oSg2Z3YB/b51N7tt1fz+Xbt5KtmLi+MNNq1vvEV56FrwssPla9EjgIgHUaf24um i+GGBGlI28ZJL12fViBIZsOHXaztlF9n5BbppXWRjN0ET/5gFzf02XaMTPgSa8Al NmN4GoZJyN9tg01s+mRo/J+YIBoyadDY667t5QKAsN1ZkAmNabc4jFM1SRArHg8B Dgs7wqhxZvJWm1k/6jBC6hSfnHbyAEjCVOdRpQqDzrhejzqm+bhufJcRgvP7v50= =5Vbq -----END PGP SIGNATURE----- --cL7lxhqt7a9gxFfSD6hvBg8GjCEEJkQuW--