From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43753) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wza7J-0005tQ-78 for qemu-devel@nongnu.org; Tue, 24 Jun 2014 19:27:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wza7E-0000s1-3I for qemu-devel@nongnu.org; Tue, 24 Jun 2014 19:27:09 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50773) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wza7D-0000rv-RD for qemu-devel@nongnu.org; Tue, 24 Jun 2014 19:27:04 -0400 Message-ID: <53AA093C.4080103@redhat.com> Date: Tue, 24 Jun 2014 17:26:52 -0600 From: Eric Blake MIME-Version: 1.0 References: <1403647561-19534-1-git-send-email-pl@kamp.de> <1403647561-19534-2-git-send-email-pl@kamp.de> In-Reply-To: <1403647561-19534-2-git-send-email-pl@kamp.de> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="R4Q1mAeq64wbdfNNMMKrgL7Hh3x5OGLMA" Subject: Re: [Qemu-devel] [PATCHv3 1/2] block/nfs: fix url parameter checking List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Lieven , qemu-devel@nongnu.org Cc: kwolf@redhat.com, pbonzini@redhat.com, ronniesahlberg@gmail.com, stefanha@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --R4Q1mAeq64wbdfNNMMKrgL7Hh3x5OGLMA Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 06/24/2014 04:06 PM, Peter Lieven wrote: > this patch fixes the incorrect usage of strncmp and > adds simple error checking by means of parse_uint_full > instead of atoi for the supplied URL parameters. >=20 > Signed-off-by: Peter Lieven > --- > block/nfs.c | 18 ++++++++++++------ > 1 file changed, 12 insertions(+), 6 deletions(-) >=20 > + if (parse_uint_full(qp->p[i].value, &val, 0)) { > + error_setg(errp, "Illegal value for NFS parameter: %s", I prefer s/Illegal/Invalid/, as this is not a case of breaking a law. But that's aesthetic. Whether or not you tweak that choice of wording: Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --R4Q1mAeq64wbdfNNMMKrgL7Hh3x5OGLMA 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 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJTqgk8AAoJEKeha0olJ0NqNaMH/2aOFsTHr90+yF/jPaAn5hoT BIcF+clo6WXRd5UyEVtCVXOG0cG1F+lGrk/D6B3F3HzdNTYzwpVFFLem/pw9qd0t bvVNa+VpJtUcHnx0VO8jIGDbT6xStJPDv42y71eI8muDGVMPr4xjeE3Ugwle5z9w gtc1tqFzjGui98Yd3fZVyE0aSl539d9c/pk77srpsjhvuV9oT2BuOhyCgoeWAFNi YBqZ+U0AIQzs7h64ULOt5mVI5iVTFQT5EEzlN2RYrbeJ9/7W0IK5mJ769bgLC++O zWWwdAFXOCJ0xlt6W2PkCt8FdDGN0cNNj3+Lluua9Rln4Y04tYk1Vs7ZKPLUsOc= =grtX -----END PGP SIGNATURE----- --R4Q1mAeq64wbdfNNMMKrgL7Hh3x5OGLMA--