From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 120569 invoked by alias); 9 Nov 2018 17:16:47 -0000 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 Received: (qmail 120556 invoked by uid 89); 9 Nov 2018 17:16:46 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 09 Nov 2018 17:16:45 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id E9ACB56091; Fri, 9 Nov 2018 12:16:43 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id ghJdTjfKuSxQ; Fri, 9 Nov 2018 12:16:43 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id AB2115608F; Fri, 9 Nov 2018 12:16:43 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id EF0A4828EA; Fri, 9 Nov 2018 09:16:41 -0800 (PST) Date: Fri, 09 Nov 2018 17:16:00 -0000 From: Joel Brobecker To: Pedro Alves Cc: Tom Tromey , gdb-patches@sourceware.org Subject: Re: [PATCH] Fix buffer overflow in ada-lang.c:move_bits Message-ID: <20181109171641.GD18647@adacore.com> References: <20181024162037.21024-1-tom@tromey.com> <20181101153517.GA2705@adacore.com> <082f66ea-223b-52f4-bc24-b274dbcf4f01@redhat.com> <609409e6-235a-4724-3ced-57c3ff42e299@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <609409e6-235a-4724-3ced-57c3ff42e299@redhat.com> User-Agent: Mutt/1.9.4 (2018-02-28) X-SW-Source: 2018-11/txt/msg00162.txt.bz2 > > I was going to suggest that this would benefit from unit tests in > > the style of dwarf2read.c:copy_bitwise's, but, actually, isn't this > > exactly the same as copy_bitwise? Can we get rid of ada-lang.c:move_bits? > > (And maybe move copy_bitwise elsewhere?) > > I meant to say dwarf2loc.c instead of dwarf2read.c. It does look exactly the same, doesn't it? I'll see if we can just re-use dwarf2loc's copy_bitwise. Thanks for the suggestion! -- Joel