public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: msnyder@sonic.net
To: binutils@sourceware.org
Subject: [patch] elf32-i386.c, check for null
Date: Thu, 26 Jul 2007 01:32:00 -0000	[thread overview]
Message-ID: <22765.12.7.175.2.1185413008.squirrel@webmail.sonic.net> (raw)

[-- Attachment #1: Type: text/plain, Size: 125 bytes --]

The function checks for h == NULL elsewhere, I assume it needs to
be checked here too (since the call will dereference it).


[-- Attachment #2: h.txt --]
[-- Type: text/plain, Size: 1043 bytes --]

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:

             reply	other threads:[~2007-07-26  1:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-26  1:32 msnyder [this message]
2007-07-26  6:18 ` H.J. Lu
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=22765.12.7.175.2.1185413008.squirrel@webmail.sonic.net \
    --to=msnyder@sonic.net \
    --cc=binutils@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).