aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/util/map.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/util/map.c')
-rw-r--r--tools/perf/util/map.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/perf/util/map.c b/tools/perf/util/map.c
index da3d4e82623..ee25ee91504 100644
--- a/tools/perf/util/map.c
+++ b/tools/perf/util/map.c
@@ -629,14 +629,14 @@ void machines__process(struct rb_root *self, machine__process_t process, void *d
}
}
-char *machine__mmap_name(struct machine *self, char *buff)
+char *machine__mmap_name(struct machine *self, char *bf, size_t size)
{
if (machine__is_host(self))
- sprintf(buff, "[%s]", "kernel.kallsyms");
+ snprintf(bf, size, "[%s]", "kernel.kallsyms");
else if (machine__is_default_guest(self))
- sprintf(buff, "[%s]", "guest.kernel.kallsyms");
+ snprintf(bf, size, "[%s]", "guest.kernel.kallsyms");
else
- sprintf(buff, "[%s.%d]", "guest.kernel.kallsyms", self->pid);
+ snprintf(bf, size, "[%s.%d]", "guest.kernel.kallsyms", self->pid);
- return buff;
+ return bf;
}