From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:46960) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S1109-00008P-TJ for qemu-devel@nongnu.org; Fri, 24 Feb 2012 14:40:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S1108-0004IX-Oc for qemu-devel@nongnu.org; Fri, 24 Feb 2012 14:40:21 -0500 Received: from mx1.redhat.com ([209.132.183.28]:55571) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S1108-0004IO-Gc for qemu-devel@nongnu.org; Fri, 24 Feb 2012 14:40:20 -0500 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q1OJeJJj011655 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 24 Feb 2012 14:40:19 -0500 Message-ID: <4F47E7A1.1020200@redhat.com> Date: Fri, 24 Feb 2012 12:40:17 -0700 From: Eric Blake MIME-Version: 1.0 References: <1329930815-7995-1-git-send-email-fsimonce@redhat.com> <1330102144-14491-2-git-send-email-fsimonce@redhat.com> <20120224170143.78f55d3e@doriath.home> In-Reply-To: <20120224170143.78f55d3e@doriath.home> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enigD74029CD8DFAC62C31D60736" Subject: Re: [Qemu-devel] [PATCH 2/2 v2] Add the blockdev-reopen and blockdev-migrate commands List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Luiz Capitulino Cc: kwolf@redhat.com, mtosatti@redhat.com, qemu-devel@nongnu.org, armbru@redhat.com, Federico Simoncelli , pbonzini@redhat.com This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigD74029CD8DFAC62C31D60736 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 02/24/2012 12:01 PM, Luiz Capitulino wrote: >> + BlockDriver *drv; >> + int i, j, escape; >> + char new_filename[2048], *filename; >=20 > I'd use PATH_MAX for new_filename's size. PATH_MAX need not be defined (and on Hurd, it intentionally is not defined); or might be so huge as to be useless. But 2048 is smaller than typical PATH_MAX of 4096, so you may still want to consider a compromise. >> + >> + new_filename[i++] =3D new_image_file[j]; >> + } >=20 > IMO, you could require the filename arguments to be escaped already. And if you do that, then the escaping should be consistent for both arguments. Libvirt is okay with pre-escaping file names before passing them to qemu. --=20 Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enigD74029CD8DFAC62C31D60736 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.12 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJPR+eiAAoJEKeha0olJ0NqEowH/2391IsyXlMKJ5GDKVPLNkQI iDX8NaMF9RPJnYLP6jaTRhPi7yyCuIDgYebFPZuQuduvJcFpnnCbfXX/jS5aFk4G h2BTv09h84Vq2wrSVJBlNhOtfghdT+iZ66v3WLlBsMhHVymuJeng+qCmcq26eFsO QBRwTaguF3z0QhY/auX3P8n0uB4NOP8HfZ3VmI5Gt57Z56ZkZp/qlEom3kuHX22Y o4K9fPqeCe+ZtGYFwjSdHjLoTl6ahafeQE9S2bQT8sQGC7KxbdAon+OnS40262PU t0kpXYRtFJWpX7BgguzXjoSnGqJnU4T3UCqjLsXBpJYIfFG9EzyD3hiNudxhxjA= =uvFv -----END PGP SIGNATURE----- --------------enigD74029CD8DFAC62C31D60736--