From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18767 invoked by alias); 18 Jul 2006 11:25:31 -0000 Received: (qmail 18754 invoked by uid 22791); 18 Jul 2006 11:25:30 -0000 X-Spam-Check-By: sourceware.org Received: from smtp-vbr3.xs4all.nl (HELO smtp-vbr3.xs4all.nl) (194.109.24.23) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 18 Jul 2006 11:25:28 +0000 Received: from webmail.xs4all.nl (dovemail10.xs4all.nl [194.109.26.12]) by smtp-vbr3.xs4all.nl (8.13.6/8.13.6) with ESMTP id k6IBPLuR052572; Tue, 18 Jul 2006 13:25:22 +0200 (CEST) (envelope-from mark.kettenis@xs4all.nl) Received: from 192.87.1.22 (SquirrelMail authenticated user sibelius) by webmail.xs4all.nl with HTTP; Tue, 18 Jul 2006 13:25:22 +0200 (CEST) Message-ID: <24758.192.87.1.22.1153221922.squirrel@webmail.xs4all.nl> In-Reply-To: <200607181356.16071.vladimir@codesourcery.com> References: <200607181356.16071.vladimir@codesourcery.com> Date: Tue, 18 Jul 2006 11:25:00 -0000 Subject: Re: [PATCH] zero-terminate result of target_read_alloc From: "Mark Kettenis" To: "Vladimir Prus" Cc: gdb-patches@sources.redhat.com User-Agent: SquirrelMail/1.4.5 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-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-07/txt/msg00222.txt.bz2 > > This patch makes result of target_read_alloc zero-terminated. > The point is that often the object is not allowed to contain embedded > zeros, > and working with zero-terminated strings is much easier. > > OK? This is wrong. Either the terminating nul is part of the object you're reading or it is not. GDB shouldn't at its own. > > - Volodya > > 2006-07-18 Vladimir Prus > > * target.c (target_read_alloc): Zero-terminate result. > >