From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 1ADB6820B0 for ; Mon, 6 Feb 2017 22:33:49 -0800 (PST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga102.fm.intel.com with ESMTP; 06 Feb 2017 22:33:48 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,345,1477983600"; d="scan'208";a="40764197" Received: from jyao1-mobl.ccr.corp.intel.com ([10.254.184.62]) by orsmga002.jf.intel.com with ESMTP; 06 Feb 2017 22:33:48 -0800 From: Jiewen Yao To: edk2-devel@lists.01.org Cc: Wang Cloud Date: Mon, 6 Feb 2017 22:33:45 -0800 Message-Id: <1486449225-16556-1-git-send-email-jiewen.yao@intel.com> X-Mailer: git-send-email 2.7.4.windows.1 Subject: [PATCH] SignedCapsulePkg/EdkiiSystemCapsuleLib: Fix logic error. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Feb 2017 06:33:49 -0000 This patch fixes https://bugzilla.tianocore.org/show_bug.cgi?id=367 Cc: Wang Cloud Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiewen Yao --- SignedCapsulePkg/Library/EdkiiSystemCapsuleLib/EdkiiSystemCapsuleLib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SignedCapsulePkg/Library/EdkiiSystemCapsuleLib/EdkiiSystemCapsuleLib.c b/SignedCapsulePkg/Library/EdkiiSystemCapsuleLib/EdkiiSystemCapsuleLib.c index dfd8d10..62be8eb 100644 --- a/SignedCapsulePkg/Library/EdkiiSystemCapsuleLib/EdkiiSystemCapsuleLib.c +++ b/SignedCapsulePkg/Library/EdkiiSystemCapsuleLib/EdkiiSystemCapsuleLib.c @@ -643,7 +643,7 @@ CapsuleAuthenticateSystemFirmware ( return EFI_SECURITY_VIOLATION; } } else { - if (CurrentImageFmpInfo->Version < ImageFmpInfo->LowestSupportedImageVersion) { + if (ImageFmpInfo->Version < CurrentImageFmpInfo->LowestSupportedImageVersion) { *LastAttemptStatus = LAST_ATTEMPT_STATUS_ERROR_INCORRECT_VERSION; DEBUG((DEBUG_INFO, "LowestSupportedImageVersion check - fail\n")); return EFI_SECURITY_VIOLATION; -- 2.7.4.windows.1