]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
module: increase dirs array size by one
authorBruce Rogers <brogers@suse.com>
Sat, 11 Apr 2020 01:07:46 +0000 (19:07 -0600)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 13 Apr 2020 06:56:18 +0000 (02:56 -0400)
With the module upgrades code change, the statically sized dirs array
can now overflow. Increase it's size by one, according to the new
maximum possible usage.

Fixes: bd83c861c0 ("modules: load modules from versioned /var/run dir")
Signed-off-by: Bruce Rogers <brogers@suse.com>
Message-Id: <20200411010746.472295-1-brogers@suse.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
util/module.c

index 5f7896870a3c644da6a4c6b3d2f46f3ebca2c83f..e48d9aacc05ac39d3a988d2c25c65cda5b3806f3 100644 (file)
@@ -177,7 +177,7 @@ bool module_load_one(const char *prefix, const char *lib_name)
     char *version_dir;
 #endif
     const char *search_dir;
-    char *dirs[4];
+    char *dirs[5];
     char *module_name;
     int i = 0, n_dirs = 0;
     int ret;