From patchwork Mon Nov 28 09:45:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Modra X-Patchwork-Id: 26600 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp5542423wrr; Mon, 28 Nov 2022 01:45:24 -0800 (PST) X-Google-Smtp-Source: AA0mqf4DMUXjlyDbyKrQ087H6nuDQPJsEStxqSEe6IVV0J83AsSh0R5oRzXoc/zPlHxFi9Cuz9UC X-Received: by 2002:aa7:dbc7:0:b0:45f:b80f:1fe8 with SMTP id v7-20020aa7dbc7000000b0045fb80f1fe8mr44694720edt.118.1669628723902; Mon, 28 Nov 2022 01:45:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669628723; cv=none; d=google.com; s=arc-20160816; b=KgVtQ+qxCapkq0HIMPX+zmTDatIOeTP61Mh6JfsdxAIfcVxPzhY83/WojUl88LAsWk VgQzNZLNuV41dUbQBCAjfASlqu6MkLOPc3SU0Rpz3AujkshICavVYvaWCWSszkW2Zz8Z ORPYjxRl9rGorSXWCd9YbcDUNEmuO2Dn2qeIMt9dC5yqEVrtItUmhZiCKGER7KimmgdT vVxHDjycPHPniLOZouGUvodKowN/A8d6J37KTXyhFC5YfK1nrzFOIAIKUMU3EQAWYaQo oUSe0M5JgSOh38Z5k+WGZzEFcJGKoa0PrG/6RPZVx+/W6AjvFOJtxF/MgdlYW+bwGi4w DrbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-disposition:mime-version:message-id:subject:to:date :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=SJTdZYXXrRSy810tygpxrXct/2LJYUtfoLZ1m00l2Cw=; b=YiqgVrLr2CNXJvpEM0Zw4k9kkhARwkS3CoHRRFkM+hxK6WFjECqyLIwNAwuQzmWqty NrXu/R20U0tOzA+nGM5mD27ArgjYaC7dFThMCzCF4oZscciCbkpogCBkhDTswenSnQh6 2wWyiVTSIbxITN1/mIxuzUfe+R1HqJYn5cIKA/c4h9V4L5acP+yJtm7C/sK1Z63xM5Wz mi3jh9tfQIjo+PAfFZ8KnVw+lC9yXK8ucenyHwxoumsl0a4toTVX71IovGWJCaF15yBA UGg6/OewFbafA4XMlOCRba1dv1re3O5Vw1BLjRorw9KDnav198+emnEQKA4muNJL9kWn 3ESA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=EUvt7zwJ; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id eg55-20020a05640228b700b00458cdba7a90si8375729edb.471.2022.11.28.01.45.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Nov 2022 01:45:23 -0800 (PST) Received-SPF: pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=EUvt7zwJ; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id DD453385221D for ; Mon, 28 Nov 2022 09:45:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DD453385221D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1669628722; bh=SJTdZYXXrRSy810tygpxrXct/2LJYUtfoLZ1m00l2Cw=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=EUvt7zwJEVo+SM+UZUJHhtXCxi3h5Nmb2poeZDn9TH/9zhNXpHpdmmcXo2Q5GU7il QTWjkwMO1KYfCinFcNcRZ1JOmeLDfnZr2yy81bEQ3NI5SPVCMvfROsiKkIYNHFQlY0 osatpXw+9EYp3dMNJuliJDhl3AjhQazS3B2tYmVs= X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mail-pf1-x429.google.com (mail-pf1-x429.google.com [IPv6:2607:f8b0:4864:20::429]) by sourceware.org (Postfix) with ESMTPS id 6C08F38532C2 for ; Mon, 28 Nov 2022 09:45:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 6C08F38532C2 Received: by mail-pf1-x429.google.com with SMTP id a9so6464875pfr.0 for ; Mon, 28 Nov 2022 01:45:14 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-disposition:mime-version:message-id:subject:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=SJTdZYXXrRSy810tygpxrXct/2LJYUtfoLZ1m00l2Cw=; b=rjZsCwycXTdbpvpO0wSi7PRBXBlT7uUdVdgCVXbS4ZO3LvDN/OtRCJQH03IiOqVxBo YpQyYDQrh1REl+khy3lx1Y7IiM4V0K1bgPong+soUwI4g+8HwDJdzw28s2/z6slpy9Tg PpRyQ/1w3Yq7QGDDWOnkzs3ntF9SceBnqmeDxQPuc24/QuD0OcwlY5oBVaJS/caifTGw K3B/xhq6zSYF5TRgLj4cLsSADN1186K0H1Exp0+TRktN29Puo3YjGUcnE5LB9GTnpZu/ RoLLJbW7j/v7mvvUnG9QUO8B/uvO26N1Jf02t2BwIEELbXSzv1WuN+Jj/YGV74WS0A+8 kCBw== X-Gm-Message-State: ANoB5pkVp2N0RGe4y4jLj/VxurH7nsSl7pc/bGH94IYWzg+K8dOnfV7Q rZ5S8Uzr5To5ioUqeNl7v86jxJu5nQU= X-Received: by 2002:a63:e341:0:b0:46f:13b0:8dab with SMTP id o1-20020a63e341000000b0046f13b08dabmr26748912pgj.497.1669628713144; Mon, 28 Nov 2022 01:45:13 -0800 (PST) Received: from squeak.grove.modra.org (158.106.96.58.static.exetel.com.au. [58.96.106.158]) by smtp.gmail.com with ESMTPSA id y1-20020aa79421000000b005751f455e0esm2307793pfo.120.2022.11.28.01.45.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Nov 2022 01:45:12 -0800 (PST) Received: by squeak.grove.modra.org (Postfix, from userid 1000) id 0A7C41142D28; Mon, 28 Nov 2022 20:15:10 +1030 (ACDT) Date: Mon, 28 Nov 2022 20:15:10 +1030 To: binutils@sourceware.org Subject: asan: pef: buffer overflow Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-Spam-Status: No, score=-3036.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Alan Modra via Binutils From: Alan Modra Reply-To: Alan Modra Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org Sender: "Binutils" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750732608649951928?= X-GMAIL-MSGID: =?utf-8?q?1750732608649951928?= * pef.c (bfd_pef_parse_traceback_table): Correct size moved when stripping leading dot. diff --git a/bfd/pef.c b/bfd/pef.c index 334d802eb75..e8672a40da7 100644 --- a/bfd/pef.c +++ b/bfd/pef.c @@ -181,7 +181,7 @@ bfd_pef_parse_traceback_table (bfd *abfd, /* Strip leading period inserted by compiler. */ if (namebuf[0] == '.') - memmove (namebuf, namebuf + 1, name.name_len + 1); + memmove (namebuf, namebuf + 1, name.name_len); sym->name = namebuf;