From: "H.J. Lu" <hjl@lucon.org>
To: msnyder@sonic.net
Cc: binutils@sourceware.org
Subject: Re: [patch] elf32-i386.c, check for null
Date: Thu, 26 Jul 2007 06:18:00 -0000 [thread overview]
Message-ID: <20070726022013.GB29523@lucon.org> (raw)
In-Reply-To: <22765.12.7.175.2.1185413008.squirrel@webmail.sonic.net>
On Wed, Jul 25, 2007 at 06:23:28PM -0700, msnyder@sonic.net wrote:
> The function checks for h == NULL elsewhere, I assume it needs to
> be checked here too (since the call will dereference it).
>
> 2007-07-25 Michael Snyder <msnyder@access-company.com>
>
> * elf32-i386.c (elf_i386_check_relocs): Check for null pointer.
>
> Index: elf32-i386.c
> ===================================================================
> RCS file: /cvs/src/src/bfd/elf32-i386.c,v
> retrieving revision 1.174
> diff -p -r1.174 elf32-i386.c
> *** elf32-i386.c 3 Jul 2007 14:26:41 -0000 1.174
> --- elf32-i386.c 26 Jul 2007 01:20:28 -0000
> *************** elf_i386_check_relocs (bfd *abfd,
> *** 1277,1284 ****
> /* This relocation describes which C++ vtable entries are actually
> used. Record for later use during GC. */
> case R_386_GNU_VTENTRY:
> ! if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_offset))
> ! return FALSE;
> break;
>
> default:
> --- 1277,1285 ----
> /* This relocation describes which C++ vtable entries are actually
> used. Record for later use during GC. */
> case R_386_GNU_VTENTRY:
> ! if (h != NULL)
> ! if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_offset))
> ! return FALSE;
> break;
>
> default:
I prefer BFD_ASSERT (h != NULL) and R_386_GNU_VTINHERIT has the same
issue.
H.J.
next prev parent reply other threads:[~2007-07-26 2:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-26 1:32 msnyder
2007-07-26 6:18 ` H.J. Lu [this message]
2007-07-27 1:57 ` msnyder
2007-07-27 4:46 ` H.J. Lu
2007-07-27 18:54 ` msnyder
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=20070726022013.GB29523@lucon.org \
--to=hjl@lucon.org \
--cc=binutils@sourceware.org \
--cc=msnyder@sonic.net \
/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).