From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2229 invoked by alias); 1 Aug 2007 01:44:31 -0000 Received: (qmail 2212 invoked by uid 22791); 1 Aug 2007 01:44:30 -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; Wed, 01 Aug 2007 01:44:28 +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 l711iC11005578; Tue, 31 Jul 2007 18:44:12 -0700 Received: from 12.7.175.2 (SquirrelMail authenticated user msnyder) by webmail.sonic.net with HTTP; Tue, 31 Jul 2007 18:44:12 -0700 (PDT) Message-ID: <7317.12.7.175.2.1185932652.squirrel@webmail.sonic.net> Date: Wed, 01 Aug 2007 01:44:00 -0000 Subject: PATCH: libiberty/cp-demangle.c, guard against null From: msnyder@sonic.net To: gcc-patches@gcc.gnu.org, gdb-patches@sourceware.org, binutils@sourceware.org Cc: ian@airs.com, bje@ibm.com, dj@redhat.com, dberlin@dberlin.org User-Agent: SquirrelMail/1.4.9a MIME-Version: 1.0 Content-Type: multipart/mixed;boundary="----=_20070731184412_51689" Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-08/txt/msg00001.txt.bz2 ------=_20070731184412_51689 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Content-length: 0 ------=_20070731184412_51689 Content-Type: text/plain; name="18.txt" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="18.txt" Content-length: 775 2007-07-31 Michael Snyder * cp-demangle.c (d_print_comp): Guard against null. Index: cp-demangle.c =================================================================== RCS file: /cvs/src/src/libiberty/cp-demangle.c,v retrieving revision 1.67 diff -p -r1.67 cp-demangle.c *** cp-demangle.c 6 May 2007 00:25:11 -0000 1.67 --- cp-demangle.c 1 Aug 2007 01:41:03 -0000 *************** d_print_comp (struct d_print_info *dpi, *** 2912,2917 **** --- 2912,2923 ---- typed_name = d_left (typed_name); } + if (typed_name == NULL) + { + d_print_error (dpi); + return; + } + /* If typed_name is a template, then it applies to the function type as well. */ if (typed_name->type == DEMANGLE_COMPONENT_TEMPLATE) ------=_20070731184412_51689--