On 02/24/2012 12:01 PM, Luiz Capitulino wrote: >> + BlockDriver *drv; >> + int i, j, escape; >> + char new_filename[2048], *filename; > > 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++] = new_image_file[j]; >> + } > > 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. -- Eric Blake ebl...@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature