Message ID | 20191128071049.3879-1-svens@stackframe.org |
---|---|
State | New |
Headers | show
Return-Path: <flashrom-bounces@flashrom.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.helo=coreboot.org (client-ip=78.46.105.101; helo=coreboot.org; envelope-from=flashrom-bounces@flashrom.org; receiver=<UNKNOWN>) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=stackframe.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=duncanthrax.net header.i=@duncanthrax.net header.b="j9xe/Lm9"; dkim-atps=neutral Received: from coreboot.org (coreboot.org [78.46.105.101]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47Nqpj743wz9sPJ for <incoming@patchwork.ozlabs.org>; Thu, 28 Nov 2019 19:01:32 +1100 (AEDT) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by coreboot.org (Postfix) with ESMTPA id 4AC77385F1; Thu, 28 Nov 2019 08:01:24 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by coreboot.org (Postfix) with ESMTP id E1CF4385D8 for <flashrom@flashrom.org>; Thu, 28 Nov 2019 08:01:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=duncanthrax.net; s=dkim; h=Content-Transfer-Encoding:MIME-Version: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=iRmMkXSdrUg1tv4fIE2pLjlY3EPWGkdw6aBnTiBxezE=; b=j9xe/Lm9OY7QiFxVBaf7FxGI3J FN+JUg0X2jsCDRsMc4mHKBiAQcNU1A80GArHyuIdLDAZgFy4E9AdqGyQN1GO2Ms0A66JDAPEQliZL VGDHd6Wf6fz8rNIdjNTIvdHgCtmXEwHhAFHi//r3yYUgfEkuGiMTNFaBLOhF2AL6c8wU=; Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by smtp.duncanthrax.net with esmtpa (Exim 4.90_1) (envelope-from <svens@stackframe.org>) id 1iaDwy-00080E-Kg; Thu, 28 Nov 2019 08:10:52 +0100 From: Sven Schnelle <svens@stackframe.org> To: flashrom@flashrom.org Date: Thu, 28 Nov 2019 08:10:49 +0100 Message-Id: <20191128071049.3879-1-svens@stackframe.org> MIME-Version: 1.0 Message-ID-Hash: MQGU3NWCBEAEH3U35V3UVTP5RG56U3JL X-Message-ID-Hash: MQGU3NWCBEAEH3U35V3UVTP5RG56U3JL X-MailFrom: svens@stackframe.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-flashrom.flashrom.org-0; header-match-flashrom.flashrom.org-1; header-match-flashrom.flashrom.org-2; header-match-flashrom.flashrom.org-3; header-match-flashrom.flashrom.org-4; header-match-flashrom.flashrom.org-5; header-match-flashrom.flashrom.org-6; header-match-flashrom.flashrom.org-7; header-match-flashrom.flashrom.org-8; header-match-flashrom.flashrom.org-9; header-match-flashrom.flashrom.org-10; header-match-flashrom.flashrom.org-11; header-match-flashrom.flashrom.org-12; header-match-flashrom.flashrom.org-13; header-match-flashrom.flashrom.org-14; header-match-flashrom.flashrom.org-15; header-match-flashrom.flashrom.org-16; header-match-flashrom.flashrom.org-17; header-match-flashrom.flashrom.org-18; header-match-flashrom.flashrom.org-19; header-match-flashrom.flashrom.org-20; header-match-flashrom.flashrom.org-21; header-match-flashrom.flashrom.org- 22; header-match-flashrom.flashrom.org-23; header-match-flashrom.flashrom.org-24; header-match-flashrom.flashrom.org-25; header-match-flashrom.flashrom.org-26; header-match-flashrom.flashrom.org-27; header-match-flashrom.flashrom.org-28; header-match-flashrom.flashrom.org-29; header-match-flashrom.flashrom.org-30; header-match-flashrom.flashrom.org-31; header-match-flashrom.flashrom.org-32; header-match-flashrom.flashrom.org-33; header-match-flashrom.flashrom.org-34; header-match-flashrom.flashrom.org-35; header-match-flashrom.flashrom.org-36; header-match-flashrom.flashrom.org-37; header-match-flashrom.flashrom.org-38; header-match-flashrom.flashrom.org-39; header-match-flashrom.flashrom.org-40; header-match-flashrom.flashrom.org-41; header-match-flashrom.flashrom.org-42; header-match-flashrom.flashrom.org-43; header-match-flashrom.flashrom.org-44; header-match-flashrom.flashrom.org-45; header-match-flashrom.flashrom.org-46; header-match-flashrom.flashrom.org-47; header-match-flash rom.flashrom.org-48; header-match-flashrom.flashrom.org-49; header-match-flashrom.flashrom.org-50; header-match-flashrom.flashrom.org-51; header-match-flashrom.flashrom.org-52; header-match-flashrom.flashrom.org-53; header-match-flashrom.flashrom.org-54; header-match-flashrom.flashrom.org-55; header-match-flashrom.flashrom.org-56; header-match-flashrom.flashrom.org-57; header-match-flashrom.flashrom.org-58; header-match-flashrom.flashrom.org-59; header-match-flashrom.flashrom.org-60; header-match-flashrom.flashrom.org-61; header-match-flashrom.flashrom.org-62; header-match-flashrom.flashrom.org-63; header-match-flashrom.flashrom.org-64; header-match-flashrom.flashrom.org-65; header-match-flashrom.flashrom.org-66; header-match-flashrom.flashrom.org-67; header-match-flashrom.flashrom.org-68; header-match-flashrom.flashrom.org-69; header-match-flashrom.flashrom.org-70; header-match-flashrom.flashrom.org-71; header-match-flashrom.flashrom.org-72; header-match-flashrom.flashrom.org-73; n onmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header CC: Sven Schnelle <svens@stackframe.org> X-Mailman-Version: 3.3.1 Precedence: list Subject: [flashrom] [PATCH] dmi: fix segfault when physmap_ro() fails to map DMI area List-Id: flashrom discussion and development mailing list <flashrom.flashrom.org> Archived-At: <https://mail.coreboot.org/hyperkitty/list/flashrom@flashrom.org/message/MQGU3NWCBEAEH3U35V3UVTP5RG56U3JL/> List-Archive: <https://mail.coreboot.org/hyperkitty/list/flashrom@flashrom.org/> List-Help: <mailto:flashrom-request@flashrom.org?subject=help> List-Post: <mailto:flashrom@flashrom.org> List-Subscribe: <mailto:flashrom-join@flashrom.org> List-Unsubscribe: <mailto:flashrom-leave@flashrom.org> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Spamd-Bar: +++++++++ X-Spam-Level: ********* Authentication-Results: coreboot.org; auth=pass smtp.auth=mailman@coreboot.org smtp.mailfrom=flashrom-bounces@flashrom.org X-Spam: Yes |
Series |
dmi: fix segfault when physmap_ro() fails to map DMI area
|
expand
|
diff --git a/dmi.c b/dmi.c index c44221c..7488d61 100644 --- a/dmi.c +++ b/dmi.c @@ -164,7 +164,7 @@ static void dmi_table(uint32_t base, uint16_t len, uint16_t num) unsigned int i = 0, j = 0; uint8_t *dmi_table_mem = physmap_ro("DMI Table", base, len); - if (dmi_table_mem == NULL) { + if (dmi_table_mem == ERROR_PTR) { msg_perr("Unable to access DMI Table\n"); return; }
physmap_ro() returns ERROR_PTR and not NULL on failure. Change-Id: I365ebfeb985508253d3ec27f9d9f47491d77b7ed Signed-off-by: Sven Schnelle <svens@stackframe.org> --- dmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)