Re: [libvirt] [PATCH 3/7] vbox: avoid problematic uses of sprintf

2010-09-02 Thread Eric Blake
On 09/02/2010 05:43 AM, Matthias Bolte wrote: -/* Assuming can't have more then devices so - * restricting to %04d +/* Zero pad for nice alignment when fewer than + * devices.

Re: [libvirt] [PATCH 3/7] vbox: avoid problematic uses of sprintf

2010-09-02 Thread Matthias Bolte
2010/9/1 Eric Blake : > * src/vbox/vbox_tmpl.c (vboxStartMachine, vboxAttachUSB): Use > virAsprintf instead. > --- > > This removes all use of sprintf in vbox.  The first 3 use virAsprintf > (DISPLAY may be arbitrarily long, and while we are unlikely to hit > devices, it's better to be safe th

[libvirt] [PATCH 3/7] vbox: avoid problematic uses of sprintf

2010-09-01 Thread Eric Blake
* src/vbox/vbox_tmpl.c (vboxStartMachine, vboxAttachUSB): Use virAsprintf instead. --- This removes all use of sprintf in vbox. The first 3 use virAsprintf (DISPLAY may be arbitrarily long, and while we are unlikely to hit devices, it's better to be safe than to risk silent buffer overflow);