From: Hui Zhu <teawater@gmail.com>
To: gdb-patches ml <gdb-patches@sourceware.org>
Subject: [PATCH]prec: record_arch_list_add_mem add check for len
Date: Mon, 19 Jul 2010 08:08:00 -0000 [thread overview]
Message-ID: <AANLkTiksyvVzkAiwf1Rh3yDfiY4aSsN21RwoJPBkajES@mail.gmail.com> (raw)
Add this check for some code maybe len < 0.
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);
next reply other threads:[~2010-07-19 8:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-19 8:08 Hui Zhu [this message]
2010-07-20 12:51 ` Pedro Alves
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=AANLkTiksyvVzkAiwf1Rh3yDfiY4aSsN21RwoJPBkajES@mail.gmail.com \
--to=teawater@gmail.com \
--cc=gdb-patches@sourceware.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