Skip to content

Commit 267514b

Browse files
bfrogersbonzini
authored andcommitted
module: increase dirs array size by one
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: bd83c86 ("modules: load modules from versioned /var/run dir") Signed-off-by: Bruce Rogers <[email protected]> Message-Id: <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
1 parent d489ae4 commit 267514b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

util/module.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ bool module_load_one(const char *prefix, const char *lib_name)
177177
char *version_dir;
178178
#endif
179179
const char *search_dir;
180-
char *dirs[4];
180+
char *dirs[5];
181181
char *module_name;
182182
int i = 0, n_dirs = 0;
183183
int ret;

0 commit comments

Comments
 (0)