From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from knopi.disroot.org (knopi.disroot.org [178.21.23.139]) by sourceware.org (Postfix) with ESMTPS id E6B7A3858018 for ; Thu, 10 Jun 2021 01:00:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E6B7A3858018 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 0F4665BE46; Thu, 10 Jun 2021 03:00:12 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at disroot.org Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7IWw4h0EB6sK; Thu, 10 Jun 2021 03:00:11 +0200 (CEST) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 From: =?utf-8?q?=C3=89rico_Nogueira?= To: "Omar Sandoval" , Subject: Re: [PATCH] libdwfl: fix crash when reading link map Date: Wed, 09 Jun 2021 21:59:06 -0300 Message-Id: In-Reply-To: X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, SPF_HELO_NONE, SPF_PASS, 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:00:16 -0000 Hope you don't mind my nit, then :) 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 > >=20 > > 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. > >=20 > > Fixes: 3bf41d458fb6 ("link_map: Pull read_addrs() into file scope") mad= e > ^^^^ > Stray word here, hopefully not too much trouble to fix up when applying.