mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
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.
This commit is contained in:
@@ -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: "
|
||||
|
||||
Reference in New Issue
Block a user