From: Ingo Molnar <mingo@elte.hu>
To: Erdem Aktas <eaktas1@gmail.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>,
Paul Mackerras <paulus@samba.org>,
Corey Ashford <cjashfor@linux.vnet.ibm.com>,
linux-kernel@vger.kernel.org
Subject: Re: perf_counter: buffer overwrite problem for perf top command
Date: Sun, 10 May 2009 08:22:52 +0200 [thread overview]
Message-ID: <20090510062252.GB30778@elte.hu> (raw)
In-Reply-To: <3fee128b0905092313x608e65e0l7b1116d86914114f@mail.gmail.com>
* Erdem Aktas <eaktas1@gmail.com> wrote:
> Hi;
> 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. should not we use malloc(strlen(str)+1) ?
indeed, well spotted - we do an strcpy into that buffer so the \0 at
the end of the string has to be allocated too.
I've applied it to tip:perfcounters/core and tip/master and pushed
it out. Thanks,
Ingo
next prev parent reply other threads:[~2009-05-10 6:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-10 6:13 Erdem Aktas
2009-05-10 6:22 ` Ingo Molnar [this message]
2009-05-10 6:24 ` [tip:perfcounters/core] perf_counter tools: fix " tip-bot for Erdem Aktas
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=20090510062252.GB30778@elte.hu \
--to=mingo@elte.hu \
--cc=a.p.zijlstra@chello.nl \
--cc=cjashfor@linux.vnet.ibm.com \
--cc=eaktas1@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=paulus@samba.org \
/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
all inboxes | Powered by JetHome®