Message ID | ZJKWtMcKv3ZBw0Cq@squeak.grove.modra.org |
---|---|
State | Accepted |
Headers |
Return-Path: <binutils-bounces+ouuuleilei=gmail.com@sourceware.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp4154702vqr; Tue, 20 Jun 2023 23:20:54 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4kdE7G873ckjvEt4iwG6XwV9D2ZK2XtDVJ/kF+TT/fs/MV+y3kPZFX5H9BhfblhX3txE3A X-Received: by 2002:aa7:c393:0:b0:51a:44b3:ab82 with SMTP id k19-20020aa7c393000000b0051a44b3ab82mr7615828edq.38.1687328454413; Tue, 20 Jun 2023 23:20:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687328454; cv=none; d=google.com; s=arc-20160816; b=kDW97yY7UEisfaH10wZYuZ1q94vNYcvznh/rhc3X4C9hg+0aceTDmw1VGJyFZNyHvC cV7Ixyt1mew546mThP713NxXDJ6Hzx3XRyEC3v7jzNXYVOhmy0Ltj13nPfsJWtbZKTN2 ALKUq7hGhhw5jmt+Ie+zxSSGD/tbetPP8CpzAW+LQidZo3hTq5UMZoEZ5Mw236uEnrrd naxTD+2Z8r1PaP9SB88N9PHIw4Axw5tz+Vgv/8SPHYgxrzi09iyPT8CQxp2d00FC/ZKR bTwzYZ+Uj39rwuv1d/6PaAH7KRHh7pGpZAIkCMIX6eE7GrzbQSDXCEPBN/2yKmFcfJws VCSw== 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=A8qYh3J/jch8viHrfLmq9Z1a4SzF/8jE0d+nwYEKjSI=; b=HLrwvf8rLmjnNA8H8/yErXIXM5IudOXSfWczumEYVSEG+cRSi+LxfVX+5bSlDJKudU 3nTcsx/q8i0p0XcvSapryxh7gaYGKMEynvJuq0+Ro572tV2MZg8TcMm+xWDCDgRdg+oN IUIKXpVsB6HEzDvDkwH9Dq9fTP3zDME5dB6JzeUN0bvdqILGWmIvlnMgRONQ5KzSSSuu PzRznrTwvhwIl2ED7u2Jd7V1TQQIZAacASbXvuk4EydzkmvoPvK5vr8GAg7tfckC5h2A Ekud+5+ROnckmcxNy7qcE5KEJUWhd2LY6IdPuR4zJEYpcqPqpL9Avez+IM/8KB5dXAt/ EGtQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=pphbn+b4; 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 dy11-20020a05640231eb00b0051a2cc855acsi1859357edb.670.2023.06.20.23.20.54 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Jun 2023 23:20:54 -0700 (PDT) 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=pphbn+b4; 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 D787D3858422 for <ouuuleilei@gmail.com>; Wed, 21 Jun 2023 06:20:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D787D3858422 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1687328450; bh=A8qYh3J/jch8viHrfLmq9Z1a4SzF/8jE0d+nwYEKjSI=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=pphbn+b498xnK8qY5Yl20lOIcBaCObJQ5qhtH0j02xPBVqrX7vZ6xuCRE7c6WG45J TPfY1yGIYSh7+x5Ic4j6jpgez/SLo4gx4k9VMKmPvrQBH6hIesglMpJ6spBww/pX51 C0if25sn3ZOxLfT8WNWKnyZfbCZ1F1ipHVuNnr+o= 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 BA298385828D for <binutils@sourceware.org>; Wed, 21 Jun 2023 06:20:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BA298385828D Received: by mail-pl1-x62b.google.com with SMTP id d9443c01a7336-1b52132181aso28497775ad.2 for <binutils@sourceware.org>; Tue, 20 Jun 2023 23:20:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687328440; x=1689920440; 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=A8qYh3J/jch8viHrfLmq9Z1a4SzF/8jE0d+nwYEKjSI=; b=hHDyHUd8Z8Os6C45oTNkDdALu2AQAjH7f7nP3osCLzeAKaksWglU7jaXLav/gmn+r6 MjtmT3CB6RyQTzQfr0XAKE3pkcehHfZH7I8pbGCUTBJHKB2mLMY018z5rWsGZ5hqB0ZF eJmm9w/kyY/3ncogsKR6fJ8pyfe4KSLkMa/DZUh0MQgm+A+rXmW/KloX4qh76j3w7ctf dNCebNfefQ/TPEQ9UzFNVydcjR20m/xe91vf6C6yxT5QkxW7LoZOFjz9yeUtOb944t4m Bgd1Wpfjp82G27JQdnzUVsQb0cixjJ6P7VQGB4XUCRqO1GWnoL1U4XaN8Pc55BY9YxTe 35iw== X-Gm-Message-State: AC+VfDxDFXO1Rcv9QaoD1gP277ztPQ6/xP/bWZEX3CJZsbO8eNZYQKn/ /HKh9HFwCS9BYka5bQDDSIUJS5HGVzI= X-Received: by 2002:a17:90a:35c:b0:25f:982:2d6c with SMTP id 28-20020a17090a035c00b0025f09822d6cmr4892809pjf.24.1687328440140; Tue, 20 Jun 2023 23:20:40 -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 l186-20020a6391c3000000b0052c9d1533b6sm2355825pge.56.2023.06.20.23.20.38 for <binutils@sourceware.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Jun 2023 23:20:39 -0700 (PDT) Received: by squeak.grove.modra.org (Postfix, from userid 1000) id 9E9FA11434F8; Wed, 21 Jun 2023 15:50:36 +0930 (ACST) Date: Wed, 21 Jun 2023 15:50:36 +0930 To: binutils@sourceware.org Subject: macho-o.c don't leak strtab Message-ID: <ZJKWtMcKv3ZBw0Cq@squeak.grove.modra.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-3034.6 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, T_SCC_BODY_TEXT_LINE 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 <binutils.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/binutils>, <mailto:binutils-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/binutils/> List-Post: <mailto:binutils@sourceware.org> List-Help: <mailto:binutils-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/binutils>, <mailto:binutils-request@sourceware.org?subject=subscribe> From: Alan Modra via Binutils <binutils@sourceware.org> Reply-To: Alan Modra <amodra@gmail.com> Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org Sender: "Binutils" <binutils-bounces+ouuuleilei=gmail.com@sourceware.org> X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1769292121610576419?= X-GMAIL-MSGID: =?utf-8?q?1769292121610576419?= |
Series |
macho-o.c don't leak strtab
|
|
Checks
Context | Check | Description |
---|---|---|
snail/binutils-gdb-check | success | Github commit url |
Commit Message
Alan Modra
June 21, 2023, 6:20 a.m. UTC
* mach-o.c (bfd_mach_o_write_symtab_content): Free strtab on success path.
diff --git a/bfd/mach-o.c b/bfd/mach-o.c index 55407fa347d..4d414fd95db 100644 --- a/bfd/mach-o.c +++ b/bfd/mach-o.c @@ -2073,6 +2073,8 @@ bfd_mach_o_write_symtab_content (bfd *abfd, bfd_mach_o_symtab_command *sym) if (!_bfd_stringtab_emit (abfd, strtab)) goto err; + _bfd_stringtab_free (strtab); + /* Pad string table. */ padlen = bfd_mach_o_pad4 (abfd, sym->strsize); if (padlen < 0)