From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x1034.google.com (mail-pj1-x1034.google.com [IPv6:2607:f8b0:4864:20::1034]) by sourceware.org (Postfix) with ESMTPS id 9E9043858018 for ; Thu, 10 Jun 2021 01:02:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9E9043858018 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=osandov.com Authentication-Results: sourceware.org; spf=none smtp.mailfrom=osandov.com Received: by mail-pj1-x1034.google.com with SMTP id m13-20020a17090b068db02901656cc93a75so2706953pjz.3 for ; Wed, 09 Jun 2021 18:02:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osandov-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=mo2jT0nG2b6styTfuNVxNSN+IbMbqt1dxmd0xzOREe0=; b=exPCYce/tiUKFyvbmYmoHF3nvzhDmoxtdp2tHkk+FHv0H6f8Lwq6Vr7hjESwmxHH63 wgzfYcq7DGql6+0aATKaDqkXRB9UU5z5qRUuR3u5AcVlG2nUh8mkfDx/ASVfe5fo4CA2 W0TeBDHpod7n5PxKrd+auyqxVavRNjDx/2ZH986gGsRkZEU2l9SGNY9ZbHZicCrEO1tX 3egc6q3HIYkGxusHoA82bDSIJrAGvqOUmae/PCybd0eQmoCSsaOUvHDiY7uSNC97aNuP xWW6AVNcKm2YMzsztXgfC0FHEBm043Foi9U9LO2OtBVcgBArvJB4H8k3LtuQMbTPYG3Y WmbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=mo2jT0nG2b6styTfuNVxNSN+IbMbqt1dxmd0xzOREe0=; b=CBG/YPESs/qGwIdWxL/QPeiXL9UXLa3hvEv32pyaHu9Z7vlsGCvT0Q9zskSrdLVyUB wSeCjcUhL0tGqqOo0udvBIOLV0rQu/Fmt9islVaaJZmSUb4m4x0f8/vioxfDntxFf+Ur ZMn5b3+Fz63TgX5RIQ62myYZc9YzauYtHmcWSQequfp/qzcfHKi/UNRE7pzZN38G83+4 /5f71/dwUWDHazzpUye1yTAscyERPLOYqXztf72rOZPqC6UQMlrUkYae3pGEd3tfcmPp /KrU5zakZLH9IW4emM5I9jukrSW6Wj/xHBIG5DrUUlghR8UKEURv7k5SwSDBnkBzJVY6 hJVA== X-Gm-Message-State: AOAM532OiWbDBPOVPyozaKqEV9zcJ8PbCK5jYVXcG4PVJD8Hft+Y98zi 4EwaLgb5GE0KKMhPtyN3s5eZiQ== X-Google-Smtp-Source: ABdhPJz9WH/AIYR/bCFZY71dcsUG1JcH0guuliuv3yzAa38zpYXJvmQuzE8X+CGMh/KTJ+l+chmFzg== X-Received: by 2002:a17:902:d481:b029:10e:a80f:87ca with SMTP id c1-20020a170902d481b029010ea80f87camr2344849plg.2.1623286963605; Wed, 09 Jun 2021 18:02:43 -0700 (PDT) Received: from relinquished.localdomain ([2620:10d:c090:400::5:a169]) by smtp.gmail.com with ESMTPSA id s13sm728608pjm.34.2021.06.09.18.02.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Jun 2021 18:02:43 -0700 (PDT) Date: Wed, 9 Jun 2021 18:02:41 -0700 From: Omar Sandoval To: =?iso-8859-1?Q?=C9rico?= Nogueira Cc: elfutils-devel@sourceware.org Subject: Re: [PATCH] libdwfl: fix crash when reading link map Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: elfutils-devel@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Elfutils-devel mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jun 2021 01:02:45 -0000 On Wed, Jun 09, 2021 at 09:59:06PM -0300, Érico Nogueira wrote: > Hope you don't mind my nit, then :) Thanks, that's what I get for sending patches out right before dinner... > On Wed Jun 9, 2021 at 9:51 PM -03, Omar Sandoval wrote: > > On Wed, Jun 09, 2021 at 05:45:57PM -0700, Omar Sandoval wrote: > > > From: Omar Sandoval > > > > > > When read_addrs() was converted was converted from a nested function to > ^^^^^^^^^^^^^ repeated words > > > a normal function, there was a mistake in converting "buffer" from a > > > closure variable to a parameter: we are checking whether the pointer > > > argument is NULL, not whether the buffer itself is NULL. This causes a > > > NULL pointer dereference when we try to use the NULL buffer later. > > > > > > Fixes: 3bf41d458fb6 ("link_map: Pull read_addrs() into file scope") made > > ^^^^ > > Stray word here, hopefully not too much trouble to fix up when applying. >