From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x62b.google.com (mail-pl1-x62b.google.com [IPv6:2607:f8b0:4864:20::62b]) by sourceware.org (Postfix) with ESMTPS id C22C9385802D for ; Thu, 4 Nov 2021 22:16:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C22C9385802D Received: by mail-pl1-x62b.google.com with SMTP id t21so9630471plr.6 for ; Thu, 04 Nov 2021 15:16:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=u8flEaOtOHaXtpKWFBuhGPxHIlk/auCqfBVeQrwiOO8=; b=x46VQPqeywo3fOZDY3lvJPzpQzQSsdgRCtlzYNWgN6pDJ85LT9qds/4ZbVcAfbGj0d qdnocxTA5wJKF58mbb2B4AeK0V1rVoXx4IFQZcLfYCbD9/lSme+UmRLvtUvWYJ5gZVaV zG/E6h6EO19baP04Cx6cgrzerUiyUKlvSV2RYTtddduDWf4VIpKcaEMiVhbhq4M3T7yA HC0vXMdlnq1pU5QyiICUYBcSgkOY1GNKXEnyrjHyoLFfmiaXwDb6v2qPFAxwru3PKLEb 9l7HKGPQZvkWZvWG/+h5XWA7OWmopCGV1AlKFiyRS0po/hJUdZWLsQsJI0m7Yc0VS1h1 zqOw== X-Gm-Message-State: AOAM533n6AIDLuwFLAScEBh5PKLG5LN6ZORwZVKBQXdNisQM8Gq7ra42 QKBoSAmM3RDx7cfzh4a7eCc= X-Google-Smtp-Source: ABdhPJzH3NWZWHB8AhwadguJDBnQCnTp6rMY0EWOXrABAAcqPWxtm8IxFvZRfWaQjpc/+z54mq9O3g== X-Received: by 2002:a17:90a:ce02:: with SMTP id f2mr25415778pju.77.1636064193883; Thu, 04 Nov 2021 15:16:33 -0700 (PDT) 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 s10sm4783345pji.55.2021.11.04.15.16.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Nov 2021 15:16:33 -0700 (PDT) Received: by squeak.grove.modra.org (Postfix, from userid 1000) id 76FBA11407B3; Fri, 5 Nov 2021 08:46:30 +1030 (ACDT) Date: Fri, 5 Nov 2021 08:46:30 +1030 From: Alan Modra To: "H.J. Lu" Cc: binutils@sourceware.org, Nick Clifton Subject: Re: [PATCH] bfd: Always check compressed sections with the corrupt size Message-ID: References: <20211104133826.59372-1-hjl.tools@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211104133826.59372-1-hjl.tools@gmail.com> X-Spam-Status: No, score=-3032.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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-List-Received-Date: Thu, 04 Nov 2021 22:16:36 -0000 On Thu, Nov 04, 2021 at 06:38:26AM -0700, H.J. Lu wrote: > Always check compressed sections with the corrupt size for non-MMO > files. Skip MMO files for compress_status == COMPRESS_SECTION_NONE > since MMO has special handling for COMPRESS_SECTION_NONE. > > I am checking in this. This doesn't look correct to me. When decompressing you can read a section that is larger than the file size. -- Alan Modra Australia Development Lab, IBM