From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mx.groups.io with SMTP id smtpd.web11.10632.1673000310037872364 for ; Fri, 06 Jan 2023 02:18:30 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=Vm9gnBK1; spf=pass (domain: intel.com, ip: 134.134.136.65, mailfrom: ning.feng@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1673000310; x=1704536310; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=HySkt5UNZPP/VXxIhu0kMv+EgJX7wnmiEMx+t51/F2w=; b=Vm9gnBK1U7W9J4V5m4U/8KlerRDn0AMSJJaKzyA5Ljf2yen9BHK9pHHz 5WvGNVIGHijGFydJNxyOjs5Ofe581hZxMMwMQr20v96lhOpLTYlvIDxS4 7wPHTdeuxwrPmjtWZN5JuXo+KuTPhSuVEAgA1wPGYiysnB0yZ3OMlKwOD WFmC9wL5ioM8b6zz/SRSTdzm5Lo+q32oUl/HyyCgMNzIzofDHhbENodE2 ES806DFoqCCe78hj5D4m4qxUnKmTYswxLhwmASo5o8X2ntXBpZ37grTZh CNq3ZYEsWCQlwmP+Ji3ar7dEsBR4BoQhXl1VzrRbQGSjzZSqRiGXgJcU1 Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10581"; a="324465934" X-IronPort-AV: E=Sophos;i="5.96,304,1665471600"; d="scan'208";a="324465934" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jan 2023 02:18:29 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10581"; a="605863344" X-IronPort-AV: E=Sophos;i="5.96,304,1665471600"; d="scan'208";a="605863344" Received: from shsse002.sh.intel.com ([10.239.132.199]) by orsmga003.jf.intel.com with ESMTP; 06 Jan 2023 02:18:28 -0800 From: "Ning Feng" To: devel@edk2.groups.io Cc: Ning Feng Subject: [PATCH] UefiPayloadPkg/DebugPrintErrorLevelLibHob Date: Fri, 6 Jan 2023 13:27:00 -0500 Message-Id: X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable fix debug print error level hob not save correct debugprinterrorlevel should cover the case: Header.Lenth =3D=3DUNIVERSAL_PAYLOAD_SIZEOF_THROUGH_FIELD () Change-Id: Ibebe29fe8057e24448b31a8caa7ab6eb8054c39b BugZilla: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4264 Signed-off-by: Ning Feng --- .../DebugPrintErrorLevelLibHob/DebugPrintErrorLevelLibHob.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UefiPayloadPkg/Library/DebugPrintErrorLevelLibHob/DebugPrintEr= rorLevelLibHob.c b/UefiPayloadPkg/Library/DebugPrintErrorLevelLibHob/DebugP= rintErrorLevelLibHob.c index 4f6b4ef1fb..10bdbe2bbc 100644 --- a/UefiPayloadPkg/Library/DebugPrintErrorLevelLibHob/DebugPrintErrorLeve= lLibHob.c +++ b/UefiPayloadPkg/Library/DebugPrintErrorLevelLibHob/DebugPrintErrorLeve= lLibHob.c @@ -46,7 +46,7 @@ GetDebugPrintErrorLevel ( {=0D if (GenericHeader->Revision =3D=3D UEFI_PAYLOAD_DEBUG_PRINT_ERROR_= LEVEL_REVISION) {=0D DebugPrintErrorLevel =3D (UEFI_PAYLOAD_DEBUG_PRINT_ERROR_LEVEL = *)GET_GUID_HOB_DATA (GuidHob);=0D - if (DebugPrintErrorLevel->Header.Length > UNIVERSAL_PAYLOAD_SIZE= OF_THROUGH_FIELD (UEFI_PAYLOAD_DEBUG_PRINT_ERROR_LEVEL, ErrorLevel)) {=0D + if (DebugPrintErrorLevel->Header.Length >=3D UNIVERSAL_PAYLOAD_S= IZEOF_THROUGH_FIELD (UEFI_PAYLOAD_DEBUG_PRINT_ERROR_LEVEL, ErrorLevel)) {=0D gDebugPrintErrorLevel =3D DebugPrintErrorLevel->ErrorLevel;=0D }=0D }=0D --=20 2.25.1