From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42408) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YLI4e-0005R7-Jp for qemu-devel@nongnu.org; Tue, 10 Feb 2015 16:10:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YLI4d-0000XI-M5 for qemu-devel@nongnu.org; Tue, 10 Feb 2015 16:10:24 -0500 Received: from mx1.redhat.com ([209.132.183.28]:36073) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YLI4d-0000X7-Dn for qemu-devel@nongnu.org; Tue, 10 Feb 2015 16:10:23 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t1ALAMC8025555 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Tue, 10 Feb 2015 16:10:23 -0500 Message-ID: <54DA73BD.2040506@redhat.com> Date: Tue, 10 Feb 2015 14:10:21 -0700 From: Eric Blake MIME-Version: 1.0 References: <46d873261433f4527e88885582f96942d61758d6.1423592487.git.jcody@redhat.com> In-Reply-To: <46d873261433f4527e88885582f96942d61758d6.1423592487.git.jcody@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="MVoAcfanbXUK3HPhn3I6fcQsSk4TKe5DF" Subject: Re: [Qemu-devel] [PATCH] block: vmdk - fixed sizeof() error List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jeff Cody , qemu-devel@nongnu.org Cc: kwolf@redhat.com, pbonzini@redhat.com, famz@redhat.com, stefanha@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --MVoAcfanbXUK3HPhn3I6fcQsSk4TKe5DF Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 02/10/2015 11:22 AM, Jeff Cody wrote: > The size compared should be PATH_MAX, rather than sizeof(char *). >=20 > Reported-by: Paolo Bonzini > Signed-off-by: Jeff Cody > --- > block/vmdk.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) Reviewed-by: Eric Blake >=20 > diff --git a/block/vmdk.c b/block/vmdk.c > index 7d079ad..8410a15 100644 > --- a/block/vmdk.c > +++ b/block/vmdk.c > @@ -843,8 +843,7 @@ static int vmdk_parse_extents(const char *desc, Blo= ckDriverState *bs, > } > =20 > extent_path =3D g_malloc0(PATH_MAX); > - path_combine(extent_path, sizeof(extent_path), > - desc_file_path, fname); > + path_combine(extent_path, PATH_MAX, desc_file_path, fname); > extent_file =3D NULL; > ret =3D bdrv_open(&extent_file, extent_path, NULL, NULL, > bs->open_flags | BDRV_O_PROTOCOL, NULL, errp);= >=20 --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --MVoAcfanbXUK3HPhn3I6fcQsSk4TKe5DF 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/ iQEcBAEBCAAGBQJU2nO9AAoJEKeha0olJ0Nq4L8H/2qU6m1KA1Hy0459x/Cvk6/V sxwewhbutF4eyrFdXdqQ1k9RadnaoJEeyz7N8gTkFfoUWtDMmR5CoUktorXLkV34 t+jLqzbhRAeuCeEthrcPfUwnf7n3pdLRjZrCAEUR3YDL5yfFx9hfUX7z/D99b3vh 9KMONuPYh40iY2MmfPmkqsJlbM44cbCgoEXSj0trs7HJoMhE77kmLXHU9VEO3Z4J wLwCjyvFwv41BK6wZJ0Xv9qJQyMxtwfmjIBw0gErosxw9ADIq5QgrfsUhPC6hAfO Vknbgc8FHl1toNUyW+kPyIblRCNk2gJuh13h9xepV4eAV6rfPoueoEuc5FRR+lk= =pR08 -----END PGP SIGNATURE----- --MVoAcfanbXUK3HPhn3I6fcQsSk4TKe5DF--