From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8045 invoked by alias); 26 Nov 2012 14:43:12 -0000 Received: (qmail 7973 invoked by uid 22791); 26 Nov 2012 14:43:09 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,MSGID_MULTIPLE_AT X-Spam-Check-By: sourceware.org Received: from mailhost.u-strasbg.fr (HELO mailhost.u-strasbg.fr) (130.79.200.157) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 26 Nov 2012 14:43:02 +0000 Received: from md15.u-strasbg.fr (md15.u-strasbg.fr [130.79.200.204]) by mailhost.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id qAQEgu8g081809 ; Mon, 26 Nov 2012 15:42:56 +0100 (CET) (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from mailserver.u-strasbg.fr (ms12.u-strasbg.fr [130.79.204.112]) by md15.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id qAQEgu5b001857 ; Mon, 26 Nov 2012 15:42:56 +0100 (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from E6510Muller (gw-ics.u-strasbg.fr [130.79.210.225]) (user=mullerp mech=LOGIN) by mailserver.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id qAQEgtBQ004119 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) ; Mon, 26 Nov 2012 15:42:55 +0100 (envelope-from pierre.muller@ics-cnrs.unistra.fr) From: "Pierre Muller" To: "'Pedro Alves'" , Cc: References: <20121126142036.10142.97678.stgit@brno.lan> In-Reply-To: <20121126142036.10142.97678.stgit@brno.lan> Subject: RE: [PATCH] Fix readlink calls in GDB Date: Mon, 26 Nov 2012 14:43:00 -0000 Message-ID: <004401cdcbe4$524136c0$f6c3a440$@muller@ics-cnrs.unistra.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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: 2012-11/txt/msg00652.txt.bz2 > -----Message d'origine----- > De : gdb-patches-owner@sourceware.org [mailto:gdb-patches- > owner@sourceware.org] De la part de Pedro Alves > Envoy=C3=A9 : lundi 26 novembre 2012 15:21 > =C3=80 : gdb-patches@sourceware.org > Cc : rustyBSD@gmx.fr > Objet : [PATCH] Fix readlink calls in GDB >=20 > This is largely based on a patch Maxime sent me, to fix readlink calls > in GDB. >=20 > Several readlink calls in gdb are wrong. readlink doesn't append the > terminating nul, so if we're going to need to do that, we need to pass > 'sizeof (buf) - 1' as buffer size. Just a question: your change doesn't seem to add the terminating '\0' in all the calls concerned, is this because it concerns specific=20 native files for operating systems that already append the '\0' at the end? Because most arguments are used a 'char *' and thus the terminating zero is required, no? Pierre Muller