[Pkg-libvirt-commits] [libguestfs] 46/61: daemon: ldm: Initialize glob_t struct before passing to glob.

Hilko Bengen bengen at moszumanska.debian.org
Sat Mar 29 14:36:31 UTC 2014


This is an automated email from the git hooks/post-receive script.

bengen pushed a commit to branch experimental
in repository libguestfs.

commit 4caa2ea5ffa15719030e1528956163130020417f
Author: Richard W.M. Jones <rjones at redhat.com>
Date:   Wed Mar 26 20:07:43 2014 +0000

    daemon: ldm: Initialize glob_t struct before passing to glob.
    
    Some implementations of glob might use fields in the struct, although
    not glibc as far as I know.
    
    Issue identified by Coverity.
---
 daemon/ldm.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/daemon/ldm.c b/daemon/ldm.c
index e89fc90..aad7f78 100644
--- a/daemon/ldm.c
+++ b/daemon/ldm.c
@@ -58,6 +58,8 @@ get_devices (const char *pattern)
   int err;
   size_t i;
 
+  memset (&devs, 0, sizeof devs);
+
   err = glob (pattern, GLOB_ERR, glob_errfunc, &devs);
   if (err == GLOB_NOSPACE) {
     reply_with_error ("glob: returned GLOB_NOSPACE: "

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git



More information about the Pkg-libvirt-commits mailing list