From patchwork Fri Nov 18 01:03:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Modra X-Patchwork-Id: 22005 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp711413wrr; Thu, 17 Nov 2022 17:03:44 -0800 (PST) X-Google-Smtp-Source: AA0mqf4/uZZl3MoAd4mm+XntfYbIhfOXVaBpPr5aDJedkr+7g+HW3HUYnwE6PlN5cvZPAXm/6qYo X-Received: by 2002:a17:907:11d0:b0:78d:addf:67c1 with SMTP id va16-20020a17090711d000b0078daddf67c1mr4127867ejb.272.1668733423821; Thu, 17 Nov 2022 17:03:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668733423; cv=none; d=google.com; s=arc-20160816; b=PG68es/duf38Ckg78GYeUERwqOMRkLfIKUMGh+KTVIcZEbiwTDiCep8NUinOMATjcg YwP3cRR84kNm7FTvybXeyxR/vibyRF6fn2FrHYYMU3qrsQ1oGbK2waA4jwf46kQEWThF r+DW8eJXCL7yu4l476qdoQt9E+7cuT4tgnbfVoUf8vEFOBUW0gPjvISitLLg+gm8g5gh 4R2/GKnoeEXgGqeRTsdi8yrgdYm0x/Ybk9aXVHoqqMos/W50KsvAJfnn3QEHAu8Hiz33 uU4psDEPoe9doc38B41oKJqc+AG/pc1Ht6RR0QLkULJZgFubCeZZnzH0KDHde/L62Tkf EctQ== 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=0t9emDVRO93qsD+M5FewgG8QFKzbGh2zKmNXIQw1J/8=; b=JmjMdUfD+JFx2HCO8TNTvBn5se42cCITqDBg1lZHH+kqm2ugIivW1t53iQCBOr3xPQ ZWwHm4P5/ISZMQY4nMlAfF4s8+0YufKz5h9lpoHMNWi22FMRvXGWv6UHe8ho4qmLBbW4 0UcqCUpUZDS0Wr732Gtg9rxWnYchRIsvNNYhdqHmMesM04eKztWWh774oHbGr/2dWEpj ttWgGza4MXN9uR8fZrP4gvm55PTtb4elsFr1IJ0vupKS7aFCeIS/qAxu7V6nOclQZFcJ mmli6eI70loGRY1R/k9mjshYMAyotKLhon+YfnQH43+q6FyX/0Bh5WEBezu+Iig1O+j3 Mb8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=HJ0FCNxy; 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 (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id l11-20020aa7d94b000000b004517955b673si1841955eds.124.2022.11.17.17.03.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Nov 2022 17:03:43 -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=HJ0FCNxy; 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 BB4AD3852217 for ; Fri, 18 Nov 2022 01:03:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BB4AD3852217 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1668733417; bh=0t9emDVRO93qsD+M5FewgG8QFKzbGh2zKmNXIQw1J/8=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=HJ0FCNxyTVIqIn9ZgpvLDO+8CRora+lRVgpQSCxd63L8gfXA5nD+AyPT7DYOaIYbP VfyKwyCmDjt+SFMGLJLJSjKYQ1FbeT2NAIXp3Y59DTz8+/2fkqHx+B3Q4QTCmTeJNv K7KDmT1ntEgH6RQ+K/IuXCJRKFgKTt16rx5sdghQ= X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org 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 1FDC33852C51 for ; Fri, 18 Nov 2022 01:03:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 1FDC33852C51 Received: by mail-pl1-x62b.google.com with SMTP id 4so3260345pli.0 for ; Thu, 17 Nov 2022 17:03:20 -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=0t9emDVRO93qsD+M5FewgG8QFKzbGh2zKmNXIQw1J/8=; b=yXRzhGzSo9VVpQ78g+j1BhIhkuasNwq7780IbpJAIs4ycPNeBTbUYbQvcYc+LV0vD4 cgASmy31b9ucXf7Rn9HsPCAZiHotS7xjg+5H7lVeMeFUksbMpv4GE3ilhIbp5cLfLQUP uIX2l+ojksk0pRGxAk1qTI2THZTPGuei9BlBJq7lho+/QbjEIfpMeniwVbu4mEsSUFxU +BQRCGBIGcMIhxmh1ccC4t3aSfuAazJNDP0f29qPZW7rQJld1B5jzVSrjM5ajq+XQsXQ 9UPnp/m+AbiEQzXkQBivJEdcwp31S/n6AsmkyFhLXol6Pa6ADm6DWB1CJZHSLoBj5/JS ngYw== X-Gm-Message-State: ANoB5pkCZE9gg2Zw1dCJdQodbjJFf9mCJtbkf6UK1WBJc/1QBf52lnXi mbppSzvm0DVgz2enOehu59T10wsAKjo= X-Received: by 2002:a17:90b:b07:b0:218:79e0:3de5 with SMTP id bf7-20020a17090b0b0700b0021879e03de5mr3756136pjb.100.1668733398728; Thu, 17 Nov 2022 17:03:18 -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 q14-20020a170902a3ce00b001886ff822ffsm2054695plb.186.2022.11.17.17.03.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Nov 2022 17:03:18 -0800 (PST) Received: by squeak.grove.modra.org (Postfix, from userid 1000) id 8CD141142D51; Fri, 18 Nov 2022 11:33:15 +1030 (ACDT) Date: Fri, 18 Nov 2022 11:33:15 +1030 To: binutils@sourceware.org Subject: PR29799 heap buffer overflow in display_gdb_index dwarf.c:10548 Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-Spam-Status: No, score=-3035.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, KAM_NUMSUBJECT, 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?1749793818471751946?= X-GMAIL-MSGID: =?utf-8?q?1749793818471751946?= PR 29799 * dwarf.c (display_gdb_index): Typo fix. diff --git a/binutils/dwarf.c b/binutils/dwarf.c index 7730293326a..4bba8dfb81a 100644 --- a/binutils/dwarf.c +++ b/binutils/dwarf.c @@ -10545,7 +10545,7 @@ display_gdb_index (struct dwarf_section *section, { uint64_t low = byte_get_little_endian (address_table + i * 20, 8); uint64_t high = byte_get_little_endian (address_table + i * 20 + 8, 8); - uint32_t cu_index = byte_get_little_endian (address_table + i + 20 + 16, 4); + uint32_t cu_index = byte_get_little_endian (address_table + i * 20 + 16, 4); print_hex (low, 8); print_hex (high, 8);