mirror of
https://github.com/genesi/linux-legacy.git
synced 2026-07-08 17:56:06 +00:00
perf tools: Fix buffer allocation
commit a255a9981a8566a1efabec983b7811e937e662d2 upstream. "perf top" cores dump on my dev machine, if run from a directory where vmlinux is present: *** glibc detected *** malloc(): memory corruption: 0x085670d0 *** Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> LKML-Reference: <4ABB6EB7.7000002@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
45bc25843e
commit
11ae63deab
@@ -422,7 +422,7 @@ static int mod_dso__load_module_paths(struct mod_dso *self)
|
||||
len += strlen(uts.release);
|
||||
len += strlen("/modules.dep");
|
||||
|
||||
path = calloc(1, len);
|
||||
path = calloc(1, len + 1);
|
||||
if (path == NULL)
|
||||
goto out_failure;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user