From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31037 invoked by alias); 5 Dec 2001 13:59:48 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 30994 invoked from network); 5 Dec 2001 13:59:44 -0000 Received: from unknown (HELO cygnus.com) (205.180.230.5) by sources.redhat.com with SMTP; 5 Dec 2001 13:59:44 -0000 Received: from rtl.cygnus.com (cse.cygnus.com [205.180.230.236]) by runyon.cygnus.com (8.8.7-cygnus/8.8.7) with ESMTP id FAA26594; Wed, 5 Dec 2001 05:59:41 -0800 (PST) Received: (from ezannoni@localhost) by rtl.cygnus.com (8.11.2/8.11.0) id fB5E5qV05922; Wed, 5 Dec 2001 09:05:52 -0500 X-Authentication-Warning: krustylu.cygnus.com: ezannoni set sender to ezannoni@cygnus.com using -f From: Elena Zannoni MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15374.10688.190835.173996@krustylu.cygnus.com> Date: Wed, 05 Dec 2001 05:59:00 -0000 To: Michael Snyder Cc: gdb-patches@sources.redhat.com Subject: Re: [PATCH] symtab.c: make sure alloca is big enough In-Reply-To: <15374.9943.330817.609015@krustylu.cygnus.com> References: <200112031928.fB3JSql03665@reddwarf.cygnus.com> <15374.9943.330817.609015@krustylu.cygnus.com> X-Mailer: VM 6.97 under Emacs 20.7.1 X-SW-Source: 2001-12/txt/msg00135.txt.bz2 Elena Zannoni writes: > Michael Snyder writes: > > 2001-12-03 Michael Snyder > > > > * symtab.c (search_symbols): Make sure alloca size is big enough. > > Michael, > have you checked this in? If not please do. > > Where would this problem manifest itself? > Some testsuite cases? > > Thanks > Elena > > Never mind, I see this is already in. Elena > > > > Index: symtab.c > > =================================================================== > > RCS file: /cvs/src/src/gdb/symtab.c,v > > retrieving revision 1.48 > > diff -c -3 -p -r1.48 symtab.c > > *** symtab.c 2001/11/13 16:42:50 1.48 > > --- symtab.c 2001/12/03 19:28:26 > > *************** search_symbols (char *regexp, namespace_ > > *** 2422,2428 **** > > /* If wrong number of spaces, fix it. */ > > if (fix >= 0) > > { > > ! char *tmp = (char *) alloca (strlen (regexp) + fix); > > sprintf (tmp, "operator%.*s%s", fix, " ", opname); > > regexp = tmp; > > } > > --- 2422,2428 ---- > > /* If wrong number of spaces, fix it. */ > > if (fix >= 0) > > { > > ! char *tmp = (char *) alloca (8 + fix + strlen (opname) + 1); > > sprintf (tmp, "operator%.*s%s", fix, " ", opname); > > regexp = tmp; > > }