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 007C29410DC for ; Thu, 25 Apr 2024 04:41:14 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=WNCfSU87NXBdSqjsP5H6bCjbEZBo+v6ICc8wZNGh6Tw=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: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=hXoknS+YZzrMEgOMDVDQHzRoNkVi8R/vs9lI9WKbTLMu6ggaiXjooEz/FDg+dkYmlarJKzNH xVOnPTlpespw0t7bOh69r0WRdOmYa2D6kGFaWPJRuh4QZlAz/YC6LvEBWzZ0j9hYbg+R89UcQJV YZO/NCwCPg84aCCJRlANQ0gMPBVolGVaFtaRcfqP0anTVTFvHjCAwoh7SWN8UoSY40VYpKfHsYY 41m3Pgj0aDnwIc0vB7AG6Kh9hVyBn9RTqm2qd/Yw8mnMicva6lmSlCU1Mm5ji1yiGWidj620Hx/ hKVU2pCy9/77a1Z/iYeKmdN1CmMWbnDV6RF4h1cgaycmg== X-Received: by 127.0.0.2 with SMTP id gCQXYY7687511x7J9l0C9Yp2; 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:12 -0700 X-CSE-ConnectionGUID: LLOU7yvwTgW/LpNtIJOKdw== X-CSE-MsgGUID: BOIzkCGYQmmXLUT/qZEHVQ== X-IronPort-AV: E=McAfee;i="6600,9927,11054"; a="13469378" X-IronPort-AV: E=Sophos;i="6.07,228,1708416000"; d="scan'208";a="13469378" 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:13 -0700 X-CSE-ConnectionGUID: ksBbgsYQT++qUeSEuC0NQA== X-CSE-MsgGUID: aH26jovJTgmUQx3XbuVrqQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,228,1708416000"; d="scan'208";a="29399473" 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:10 -0700 From: "Zhiguang Liu" To: devel@edk2.groups.io Cc: Zhiguang Liu , Liming Gao , Jiaxin Wu , Ray Ni , Laszlo Ersek , Ard Biesheuvel , Sami Mujawar Subject: [edk2-devel] [PATCH 2/2] StandaloneMmPkg: Initialize 'WillReturn' variable Date: Thu, 25 Apr 2024 12:40:59 +0800 Message-Id: <20240425044059.244-2-zhiguang.liu@intel.com> In-Reply-To: <20240425044059.244-1-zhiguang.liu@intel.com> References: <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:12 -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: H00YJeZ4WvxFdLaic9clzVASx7686176AA= 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=hXoknS+Y; 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 Cc: Ard Biesheuvel Cc: Sami Mujawar Signed-off-by: Zhiguang Liu --- StandaloneMmPkg/Core/Mmi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/StandaloneMmPkg/Core/Mmi.c b/StandaloneMmPkg/Core/Mmi.c index e035245c87..fb205df490 100644 --- a/StandaloneMmPkg/Core/Mmi.c +++ b/StandaloneMmPkg/Core/Mmi.c @@ -174,6 +174,7 @@ MmiManage ( EFI_STATUS Status; mMmiManageCallingDepth++; + 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 (#118264): https://edk2.groups.io/g/devel/message/118264 Mute This Topic: https://groups.io/mt/105725160/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-