From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 382 invoked by alias); 26 Jul 2007 01:23:34 -0000 Received: (qmail 372 invoked by uid 22791); 26 Jul 2007 01:23:32 -0000 X-Spam-Check-By: sourceware.org Received: from a.mail.sonic.net (HELO a.mail.sonic.net) (64.142.16.245) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 26 Jul 2007 01:23:29 +0000 Received: from webmail.sonic.net (b.webmail.sonic.net [64.142.100.148]) by a.mail.sonic.net (8.13.8.Beta0-Sonic/8.13.7) with ESMTP id l6Q1NR0u006077 for ; Wed, 25 Jul 2007 18:23:27 -0700 Received: from 12.7.175.2 (SquirrelMail authenticated user msnyder) by webmail.sonic.net with HTTP; Wed, 25 Jul 2007 18:23:28 -0700 (PDT) Message-ID: <22765.12.7.175.2.1185413008.squirrel@webmail.sonic.net> Date: Thu, 26 Jul 2007 01:32:00 -0000 Subject: [patch] elf32-i386.c, check for null From: msnyder@sonic.net To: binutils@sourceware.org User-Agent: SquirrelMail/1.4.9a MIME-Version: 1.0 Content-Type: multipart/mixed;boundary="----=_20070725182328_29547" Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2007-07/txt/msg00431.txt.bz2 ------=_20070725182328_29547 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Content-length: 125 The function checks for h == NULL elsewhere, I assume it needs to be checked here too (since the call will dereference it). ------=_20070725182328_29547 Content-Type: text/plain; name="h.txt" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="h.txt" Content-length: 1043 2007-07-25 Michael Snyder * 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: ------=_20070725182328_29547--