Re: [libvirt] [PATCH 10/10] vbox: avoid sprintf

2010-08-20 Thread Matthias Bolte
2010/8/20 Eric Blake ebl...@redhat.com: On 08/19/2010 04:14 PM, Matthias Bolte wrote:     if (guiPresent) {         if (guiDisplay) { -            sprintf(displayutf8, DISPLAY=%.24s, guiDisplay); -            VBOX_UTF8_TO_UTF16(displayutf8, env); +            char *displayutf8; +            

Re: [libvirt] [PATCH 10/10] vbox: avoid sprintf

2010-08-19 Thread Matthias Bolte
2010/8/19 Eric Blake ebl...@redhat.com: Work in progress: This gets 2 of the 5 suspect uses; I ran out of time today. * src/vbox/vbox_tmpl.c (vboxStartMachine): Use virAsprintf instead. --- I could check this in as is (after tweaking the commit comment) and do the other three sprintf uses

Re: [libvirt] [PATCH 10/10] vbox: avoid sprintf

2010-08-19 Thread Eric Blake
On 08/19/2010 04:14 PM, Matthias Bolte wrote: if (guiPresent) { if (guiDisplay) { -sprintf(displayutf8, DISPLAY=%.24s, guiDisplay); -VBOX_UTF8_TO_UTF16(displayutf8, env); +char *displayutf8; +if (virAsprintf(displayutf8, DISPLAY=%s,

[libvirt] [PATCH 10/10] vbox: avoid sprintf

2010-08-18 Thread Eric Blake
Work in progress: This gets 2 of the 5 suspect uses; I ran out of time today. * src/vbox/vbox_tmpl.c (vboxStartMachine): Use virAsprintf instead. --- I could check this in as is (after tweaking the commit comment) and do the other three sprintf uses in another patch, but I'd rather merge all