From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18104 invoked by alias); 8 Aug 2007 22:03:21 -0000 Received: (qmail 17938 invoked by uid 22791); 8 Aug 2007 22:03:19 -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, 08 Aug 2007 22:03:14 +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 l78M3C7r008295; Wed, 8 Aug 2007 15:03:12 -0700 Received: from 12.7.175.2 (SquirrelMail authenticated user msnyder) by webmail.sonic.net with HTTP; Wed, 8 Aug 2007 15:03:12 -0700 (PDT) Message-ID: <20077.12.7.175.2.1186610592.squirrel@webmail.sonic.net> In-Reply-To: References: <13153.12.7.175.2.1186284546.squirrel@webmail.sonic.net> <15524.12.7.175.2.1186597958.squirrel@webmail.sonic.net> Date: Wed, 08 Aug 2007 22:03:00 -0000 Subject: Re: [patch] target_read_string, potential memory leak. From: msnyder@sonic.net To: "Jim Blandy" Cc: msnyder@sonic.net, gdb-patches@sourceware.org User-Agent: SquirrelMail/1.4.9a MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit 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/msg00164.txt.bz2 > > msnyder@sonic.net writes: >>> msnyder@sonic.net writes: >>>> OK -- it would be pretty stupid to call target_read_string without >>>> passing it a buffer, but if we're going to check it for null... >>> >>> I don't think the contract for target_read_string permits STRING to be >>> null. I think either the test should go, or we should add a >>> gdb_assert (string). >> >> Agreed. Thus? > > Agreed, thus. :) Committed. Fiat.