From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9342 invoked by alias); 25 Jul 2007 21:33:02 -0000 Received: (qmail 9330 invoked by uid 22791); 25 Jul 2007 21:33:01 -0000 X-Spam-Check-By: sourceware.org Received: from b.mail.sonic.net (HELO b.mail.sonic.net) (64.142.19.5) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 25 Jul 2007 21:32:59 +0000 Received: from webmail.sonic.net (b.webmail.sonic.net [64.142.100.148]) by b.mail.sonic.net (8.13.8.Beta0-Sonic/8.13.7) with ESMTP id l6PLWvrw011819 for ; Wed, 25 Jul 2007 14:32:57 -0700 Received: from 12.7.175.2 (SquirrelMail authenticated user msnyder) by webmail.sonic.net with HTTP; Wed, 25 Jul 2007 14:32:57 -0700 (PDT) Message-ID: <6879.12.7.175.2.1185399177.squirrel@webmail.sonic.net> Date: Wed, 25 Jul 2007 21:34:00 -0000 Subject: [patch] check return from bfd_make_section From: msnyder@sonic.net To: binutils@sourceware.org User-Agent: SquirrelMail/1.4.9a MIME-Version: 1.0 Content-Type: multipart/mixed;boundary="----=_20070725143257_62402" 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/msg00419.txt.bz2 ------=_20070725143257_62402 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Content-length: 50 Usually gets checked. Ptr will be dereferenced. ------=_20070725143257_62402 Content-Type: text/x-csrc; name="tekhex.c" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="tekhex.c" Content-length: 633 2007-07-25 Michael Snyder * tekhex.c (first_phase): Check return value for null. Index: tekhex.c =================================================================== RCS file: /cvs/src/src/bfd/tekhex.c,v retrieving revision 1.32 diff -p -r1.32 tekhex.c *** tekhex.c 3 Jul 2007 14:26:42 -0000 1.32 --- tekhex.c 25 Jul 2007 21:31:17 -0000 *************** first_phase (bfd *abfd, int type, char * *** 389,394 **** --- 389,396 ---- return FALSE; memcpy (n, sym, len + 1); section = bfd_make_section (abfd, n); + if (section == NULL) + return FALSE; } while (*src) { ------=_20070725143257_62402--