From: Pedro Alves <pedro@codesourcery.com>
To: gdb-patches@sourceware.org
Cc: Hui Zhu <teawater@gmail.com>
Subject: Re: [PATCH]prec: record_arch_list_add_mem add check for len
Date: Tue, 20 Jul 2010 12:51:00 -0000 [thread overview]
Message-ID: <201007201351.04862.pedro@codesourcery.com> (raw)
In-Reply-To: <AANLkTiksyvVzkAiwf1Rh3yDfiY4aSsN21RwoJPBkajES@mail.gmail.com>
On Monday 19 July 2010 09:08:17, Hui Zhu wrote:
> Add this check for some code maybe len < 0.
How can len < 0 happen? Wouldn't that be a bug?
>
> Thanks,
> Hui
>
> 2010-07-16 Hui Zhu <teawater@gmail.com>
>
> * record.c (record_arch_list_add_mem): Add check for len.
>
>
> ---
> record.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> --- a/record.c
> +++ b/record.c
> @@ -497,6 +497,8 @@ record_arch_list_add_mem (CORE_ADDR addr
>
> if (!addr) /* FIXME: Why? Some arch must permit it... */
> return 0;
> + if (len <= 0)
> + return 0;
>
> rec = record_mem_alloc (addr, len);
>
--
Pedro Alves
prev parent reply other threads:[~2010-07-20 12:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-19 8:08 Hui Zhu
2010-07-20 12:51 ` Pedro Alves [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=201007201351.04862.pedro@codesourcery.com \
--to=pedro@codesourcery.com \
--cc=gdb-patches@sourceware.org \
--cc=teawater@gmail.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