From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail05.groups.io (mail05.groups.io [45.79.224.7]) by spool.mail.gandi.net (Postfix) with ESMTPS id 921BDAC0A68 for ; Thu, 25 Apr 2024 04:41:14 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=RvXJ7k2NBw/fn9znaUNIyGIJA/YL7Tur1F8QFv4s/rM=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Resent-From:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20240206; t=1714020073; v=1; b=n78CS6Fsz7JpPnHR19faS6EP6yiTheq8cqswQJC48UFnHgHqHGAQEUmQWULa9jOQUrDOD+Gr BcC8cBfnAc6L6HKcvUeSJ7osZS2l5/uOWsD86CmHKH4NDc4BcZM24F6Zy8KA/swgOuBJ+xP0Jxs v6l+6rbQ2G+up3y3AzHu+HRq7FrXZ/HTvYcI55XnejRltRRcYpmOBlKyVHAoop/muGICUL7S9Bj 8YKpLMF/p0h4sMNNR8Fm8IJi3cVc41K94t5KgQo1WdMCDZmaJ8oIlr9dmk6rB2pWOpNqh0T2EsC d6ceAmzkx/8lzxhSTj9JoIMMCvliD+8KqajQJ9o53y4AQ== X-Received: by 127.0.0.2 with SMTP id 33NmYY7687511xLmDMs6nBl3; Wed, 24 Apr 2024 21:41:13 -0700 X-Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.12]) by mx.groups.io with SMTP id smtpd.web10.9419.1714020070668759754 for ; Wed, 24 Apr 2024 21:41:11 -0700 X-CSE-ConnectionGUID: 63HWLUG/RIu17gsWVPHR5Q== X-CSE-MsgGUID: zvAc/sHKSj2F+Ui6whXdhw== X-IronPort-AV: E=McAfee;i="6600,9927,11054"; a="13469368" X-IronPort-AV: E=Sophos;i="6.07,228,1708416000"; d="scan'208";a="13469368" X-Received: from fmviesa005.fm.intel.com ([10.60.135.145]) by fmvoesa106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Apr 2024 21:41:10 -0700 X-CSE-ConnectionGUID: WH5Rn+W0QAqNmxKWKeOJrA== X-CSE-MsgGUID: M/8RBg53RcSeOciEyMtnWQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,228,1708416000"; d="scan'208";a="29399469" X-Received: from shwdesfp01.ccr.corp.intel.com ([10.239.158.151]) by fmviesa005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Apr 2024 21:41:08 -0700 From: "Zhiguang Liu" To: devel@edk2.groups.io Cc: Zhiguang Liu , Liming Gao , Jiaxin Wu , Ray Ni , Laszlo Ersek Subject: [edk2-devel] [PATCH 1/2] MdeModulePkg/SMM: Initialize 'WillReturn' variable Date: Thu, 25 Apr 2024 12:40:58 +0800 Message-Id: <20240425044059.244-1-zhiguang.liu@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Resent-Date: Wed, 24 Apr 2024 21:41:11 -0700 Resent-From: zhiguang.liu@intel.com Reply-To: devel@edk2.groups.io,zhiguang.liu@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: lO0GB7Tu2H4uHvAGEA4aZchTx7686176AA= Content-Transfer-Encoding: 8bit X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=n78CS6Fs; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=intel.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 45.79.224.7 as permitted sender) smtp.mailfrom=bounce@groups.io The local variable 'WillReturn' was being used without prior initialization in some code paths. This patch ensures that 'WillReturn' is properly initialized to prevent undefined behavior. Cc: Liming Gao Cc: Jiaxin Wu Cc: Ray Ni Cc: Laszlo Ersek Signed-off-by: Zhiguang Liu --- MdeModulePkg/Core/PiSmmCore/Smi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/MdeModulePkg/Core/PiSmmCore/Smi.c b/MdeModulePkg/Core/PiSmmCore/Smi.c index a84a1f48d3..6b56fa5f69 100644 --- a/MdeModulePkg/Core/PiSmmCore/Smi.c +++ b/MdeModulePkg/Core/PiSmmCore/Smi.c @@ -152,6 +152,7 @@ SmiManage ( PERF_FUNCTION_BEGIN (); mSmiManageCallingDepth++; + WillReturn = FALSE; Status = EFI_NOT_FOUND; ReturnStatus = Status; if (HandlerType == NULL) { -- 2.31.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#118263): https://edk2.groups.io/g/devel/message/118263 Mute This Topic: https://groups.io/mt/105725159/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-