From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22985 invoked by alias); 31 Jul 2007 23:25:17 -0000 Received: (qmail 22973 invoked by uid 22791); 31 Jul 2007 23:25:16 -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; Tue, 31 Jul 2007 23:25:14 +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 l6VNPCHW015483 for ; Tue, 31 Jul 2007 16:25:12 -0700 Received: from 12.7.175.2 (SquirrelMail authenticated user msnyder) by webmail.sonic.net with HTTP; Tue, 31 Jul 2007 16:25:12 -0700 (PDT) Message-ID: <12757.12.7.175.2.1185924312.squirrel@webmail.sonic.net> Date: Tue, 31 Jul 2007 23:29:00 -0000 Subject: [PATCH] jv-lang, guard against NULL From: msnyder@sonic.net To: gdb-patches@sourceware.org User-Agent: SquirrelMail/1.4.9a MIME-Version: 1.0 Content-Type: multipart/mixed;boundary="----=_20070731162512_73607" 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-07/txt/msg00349.txt.bz2 ------=_20070731162512_73607 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Content-length: 0 ------=_20070731162512_73607 Content-Type: text/plain; name="255.txt" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="255.txt" Content-length: 955 2007-07-31 Michael Snyder * jv-lang.c (java_link_class_type): Guard against NULL. Index: jv-lang.c =================================================================== RCS file: /cvs/src/src/gdb/jv-lang.c,v retrieving revision 1.47 diff -p -r1.47 jv-lang.c *** jv-lang.c 13 Jun 2007 17:30:01 -0000 1.47 --- jv-lang.c 31 Jul 2007 23:23:06 -0000 *************** java_link_class_type (struct type *type, *** 407,414 **** SET_TYPE_FIELD_PRIVATE (type, 0); } ! i = strlen (name); ! if (i > 2 && name[i - 1] == ']' && tsuper != NULL) { /* FIXME */ TYPE_LENGTH (type) = TYPE_LENGTH (tsuper) + 4; /* size with "length" */ --- 407,414 ---- SET_TYPE_FIELD_PRIVATE (type, 0); } ! if (name != NULL && (i = strlen (name)) > 2 ! && name[i - 1] == ']' && tsuper != NULL) { /* FIXME */ TYPE_LENGTH (type) = TYPE_LENGTH (tsuper) + 4; /* size with "length" */ ------=_20070731162512_73607--