From: Nick Clifton <nickc@redhat.com>
To: binutils@sources.redhat.com
Subject: Fix compile time warning in bfd/xsym.c
Date: Fri, 11 Feb 2005 19:49:00 -0000 [thread overview]
Message-ID: <m3is4z57f1.fsf@redhat.com> (raw)
Hi Guys,
I am applying the patch below to fix a compile time warning building
bfd/xsym.c. The problem was a call to memcpy() with a size of 0.
It was not exactly clear from the code if this was intentional or a
coding bug, so I chose to assume that the code was correct. This
may need to be revisited one day.
Cheers
Nick
bfd/ChangeLog
2005-02-11 Nick Clifton <nickc@redhat.com>
* xsym.c (bfd_sym_parse_contained_variables_table_entry_v32):
Avoid call to memcpy with a size of 0.
Index: bfd/xsym.c
===================================================================
RCS file: /cvs/src/src/bfd/xsym.c,v
retrieving revision 1.10
diff -c -3 -p -r1.10 xsym.c
*** bfd/xsym.c 31 Jan 2005 23:13:30 -0000 1.10
--- bfd/xsym.c 11 Feb 2005 17:19:00 -0000
*************** bfd_sym_parse_contained_variables_table_
*** 464,470 ****
--- 464,472 ----
}
else if (entry->entry.la_size <= BFD_SYM_CVTE_SCA)
{
+ #if BFD_SYM_CVTE_SCA > 0
memcpy (&entry->entry.address.lastruct.la, buf + 10, BFD_SYM_CVTE_SCA);
+ #endif
entry->entry.address.lastruct.la_kind = buf[23];
}
else if (entry->entry.la_size == BFD_SYM_CVTE_BIG_LA)
reply other threads:[~2005-02-11 17:22 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=m3is4z57f1.fsf@redhat.com \
--to=nickc@redhat.com \
--cc=binutils@sources.redhat.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).