Re: [libvirt] [PATCH] Ensure virStrerror always sets an error string

2011-05-18 Thread Daniel P. Berrange
On Wed, May 18, 2011 at 11:27:28AM -0600, Eric Blake wrote: > [adding bug-gnulib] > > On 05/18/2011 11:07 AM, Daniel P. Berrange wrote: > > strerror_r() is free to not set any error string, if the passed > > errno is not valid. It may, however, still return a pointer to > > the original passed in

Re: [libvirt] [PATCH] Ensure virStrerror always sets an error string

2011-05-18 Thread Eric Blake
[adding bug-gnulib] On 05/18/2011 11:07 AM, Daniel P. Berrange wrote: > strerror_r() is free to not set any error string, if the passed > errno is not valid. It may, however, still return a pointer to > the original passed in buffer. This resulting in random garbage > from the stack being present

Re: [libvirt] [PATCH] Ensure virStrerror always sets an error string

2011-05-18 Thread Matthias Bolte
2011/5/18 Daniel P. Berrange : > strerror_r() is free to not set any error string, if the passed > errno is not valid. It may, however, still return a pointer to > the original passed in buffer. This resulting in random garbage > from the stack being present as the error string. > > To reliably det

[libvirt] [PATCH] Ensure virStrerror always sets an error string

2011-05-18 Thread Daniel P. Berrange
strerror_r() is free to not set any error string, if the passed errno is not valid. It may, however, still return a pointer to the original passed in buffer. This resulting in random garbage from the stack being present as the error string. To reliably detect case where no error string is set, pre