From: Pedro Alves <palves@redhat.com>
To: Yao Qi <yao@codesourcery.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] Use rs->buf after getpkt
Date: Tue, 04 Feb 2014 19:25:00 -0000 [thread overview]
Message-ID: <52F13EBE.9040307@redhat.com> (raw)
In-Reply-To: <1390652193-6018-1-git-send-email-yao@codesourcery.com>
On 01/25/2014 12:16 PM, Yao Qi wrote:
> Hi,
> The following code snippet looks wrong to me
>
> char *buf = rs->buf;
>
> getpkt (&rs->buf, &rs->buf_size, 0);
> packet_ok (buf, );
>
> if rs->buf is reallocated in getpkt, buf points to an out of dated
> memory.
Indeed.
> This patch removes local 'buf' and uses rs->buf.
>
> Regression tested on x86_64-linux. Is it OK?
OK.
--
Pedro Alves
next prev parent reply other threads:[~2014-02-04 19:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-25 12:18 Yao Qi
2014-02-04 19:25 ` Pedro Alves [this message]
2014-02-05 12:29 ` Yao Qi
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=52F13EBE.9040307@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=yao@codesourcery.com \
/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