projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f15b18d
)
perf_counter tools: fix buffer overwrite problem for perf top command
author
Erdem Aktas
<eaktas1@gmail.com>
Sun, 10 May 2009 06:13:19 +0000
(
02:13
-0400)
committer
Ingo Molnar
<mingo@elte.hu>
Sun, 10 May 2009 06:21:18 +0000
(08:21 +0200)
There is a buffer overwrite problem in builtin-top.c line 526, When I
tried to use ./perf top command, it was giving memory corruption
problem.
[ Impact: fix 'perf top' crash ]
LKML-Reference: <3fee128b0905092313x608e65e0l7b1116d86914114f@mail.gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Documentation/perf_counter/builtin-top.c
patch
|
blob
|
blame
|
history
diff --git
a/Documentation/perf_counter/builtin-top.c
b/Documentation/perf_counter/builtin-top.c
index cd6f61d734181c4f7403f655e6d9a89f553dbfb1..b1549dd27720081f0c3638d2b3d5bafbae6164ac 100644
(file)
--- a/
Documentation/perf_counter/builtin-top.c
+++ b/
Documentation/perf_counter/builtin-top.c
@@
-523,7
+523,7
@@
static int read_symbol(FILE *in, struct sym_entry *s)
if (strstr(sym, "_text_start") || strstr(sym, "_text_end"))
return 1;
- s->sym = malloc(strlen(str));
+ s->sym = malloc(strlen(str)
+1
);
assert(s->sym);
strcpy((char *)s->sym, str);