Re: [libvirt] [PATCH 4/7] network: use virAsprintf when appropriate

2010-09-01 Thread Eric Blake
On 09/01/2010 03:20 PM, Matthias Bolte wrote: 2010/9/1 Eric Blake: * src/conf/network_conf.c (virNetworkAllocateBridge): Avoid limited buffer from snprintf. --- Why print to a fixed-width buffer to then just strdup it later, when we can print to a malloc'd buffer in the first place. Besides, I

Re: [libvirt] [PATCH 4/7] network: use virAsprintf when appropriate

2010-09-01 Thread Matthias Bolte
2010/9/1 Eric Blake : > * src/conf/network_conf.c (virNetworkAllocateBridge): Avoid > limited buffer from snprintf. > --- > > Why print to a fixed-width buffer to then just strdup it later, > when we can print to a malloc'd buffer in the first place.  Besides, > I couldn't easily guarantee if the b

[libvirt] [PATCH 4/7] network: use virAsprintf when appropriate

2010-09-01 Thread Eric Blake
* src/conf/network_conf.c (virNetworkAllocateBridge): Avoid limited buffer from snprintf. --- Why print to a fixed-width buffer to then just strdup it later, when we can print to a malloc'd buffer in the first place. Besides, I couldn't easily guarantee if the buffer was large enough or if it wou