|
@@ -785,10 +785,10 @@ static int machine__create_modules(struct machine *machine)
|
|
|
const char *modules;
|
|
|
char path[PATH_MAX];
|
|
|
|
|
|
- if (machine__is_default_guest(machine))
|
|
|
+ if (machine__is_default_guest(machine)) {
|
|
|
modules = symbol_conf.default_guest_modules;
|
|
|
- else {
|
|
|
- sprintf(path, "%s/proc/modules", machine->root_dir);
|
|
|
+ } else {
|
|
|
+ snprintf(path, PATH_MAX, "%s/proc/modules", machine->root_dir);
|
|
|
modules = path;
|
|
|
}
|
|
|
|