From: tip-bot for Erdem Aktas <eaktas1@gmail.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, eaktas1@gmail.com, hpa@zytor.com,
mingo@redhat.com, tglx@linutronix.de, mingo@elte.hu
Subject: [tip:perfcounters/core] perf_counter tools: fix buffer overwrite problem for perf top command
Date: Sun, 10 May 2009 06:24:45 GMT [thread overview]
Message-ID: <tip-82afae6016b672acb90ceb8e773bba0bd977d2a3@git.kernel.org> (raw)
In-Reply-To: <3fee128b0905092313x608e65e0l7b1116d86914114f@mail.gmail.com>
Commit-ID: 82afae6016b672acb90ceb8e773bba0bd977d2a3
Gitweb: http://git.kernel.org/tip/82afae6016b672acb90ceb8e773bba0bd977d2a3
Author: Erdem Aktas <eaktas1@gmail.com>
AuthorDate: Sun, 10 May 2009 02:13:19 -0400
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Sun, 10 May 2009 08:21:18 +0200
perf_counter tools: fix buffer overwrite problem for perf top command
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 | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Documentation/perf_counter/builtin-top.c b/Documentation/perf_counter/builtin-top.c
index cd6f61d..b1549dd 100644
--- 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);
prev parent reply other threads:[~2009-05-10 6:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-10 6:13 perf_counter: " Erdem Aktas
2009-05-10 6:22 ` Ingo Molnar
2009-05-10 6:24 ` tip-bot for Erdem Aktas [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-82afae6016b672acb90ceb8e773bba0bd977d2a3@git.kernel.org \
--to=eaktas1@gmail.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome