[Libvir] avoid reading uninitialized memory in test program

Daniel Veillard veillard at redhat.com
Thu Oct 18 13:18:20 UTC 2007


On Wed, Oct 17, 2007 at 01:34:21PM +0200, Jim Meyering wrote:
> valgrind complained about the printf in conftest.c.
> Here's the fix:
> 
> 	* src/conf.c (__virConfWriteMem): Fix typos in comment.
> 	* tests/conftest.c (main): Use fwrite, not printf, since the
> 	result buffer is not NUL-terminated.

 Patch looks fine to me,

Daniel

-- 
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard      | virtualization library  http://libvirt.org/
veillard at redhat.com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine  http://rpmfind.net/




More information about the libvir-list mailing list