public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] SecurityPkg/Tcg2PhysicalPresenceLib: Fix incorrect TCG VER comparision
@ 2020-07-09  2:46 Gao, Zhichao
  2020-07-09 10:02 ` [edk2-devel] " Laszlo Ersek
  0 siblings, 1 reply; 15+ messages in thread
From: Gao, Zhichao @ 2020-07-09  2:46 UTC (permalink / raw)
  To: devel; +Cc: Terry Lee, Jiewen Yao, Jian J Wang, Chao Zhang

From: Terry Lee <terry.lee@hpe.com>

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2697

Tcg2PhysicalPresenceLibConstructor set the module variable
mIsTcg2PPVerLowerThan_1_3 with incorrect TCG version comparision.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Chao Zhang <chao.b.zhang@intel.com>
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
---
 .../SmmTcg2PhysicalPresenceLib/SmmTcg2PhysicalPresenceLib.c     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/SecurityPkg/Library/SmmTcg2PhysicalPresenceLib/SmmTcg2PhysicalPresenceLib.c b/SecurityPkg/Library/SmmTcg2PhysicalPresenceLib/SmmTcg2PhysicalPresenceLib.c
index 1c46d5e69d..8afaa0a785 100644
--- a/SecurityPkg/Library/SmmTcg2PhysicalPresenceLib/SmmTcg2PhysicalPresenceLib.c
+++ b/SecurityPkg/Library/SmmTcg2PhysicalPresenceLib/SmmTcg2PhysicalPresenceLib.c
@@ -387,7 +387,7 @@ Tcg2PhysicalPresenceLibConstructor (
 {
   EFI_STATUS  Status;
 
-  if (AsciiStrnCmp(PP_INF_VERSION_1_2, (CHAR8 *)PcdGetPtr(PcdTcgPhysicalPresenceInterfaceVer), sizeof(PP_INF_VERSION_1_2) - 1) <= 0) {
+  if (AsciiStrnCmp(PP_INF_VERSION_1_2, (CHAR8 *)PcdGetPtr(PcdTcgPhysicalPresenceInterfaceVer), sizeof(PP_INF_VERSION_1_2) - 1) >= 0) {
     mIsTcg2PPVerLowerThan_1_3 = TRUE;
   }
 
-- 
2.21.0.windows.1


^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2020-10-19 15:40 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-09  2:46 [PATCH] SecurityPkg/Tcg2PhysicalPresenceLib: Fix incorrect TCG VER comparision Gao, Zhichao
2020-07-09 10:02 ` [edk2-devel] " Laszlo Ersek
2020-07-10  0:44   ` Gao, Zhichao
2020-07-10  5:43     ` Laszlo Ersek
2020-07-10 13:53       ` Stefan Berger
     [not found]       ` <1620688EE0DC3449.7755@groups.io>
2020-07-10 14:27         ` Stefan Berger
2020-07-13 14:38           ` Laszlo Ersek
2020-10-15 16:58           ` Lee, Terry
2020-10-16  1:09             ` Yao, Jiewen
2020-10-16  2:25               ` Lee, Terry
2020-10-16  2:30                 ` Yao, Jiewen
2020-10-16  5:32                   ` Lee, Terry
2020-10-16  5:54                     ` Yao, Jiewen
     [not found]                     ` <163E634CB21B8196.31077@groups.io>
2020-10-18  1:18                       ` Yao, Jiewen
2020-10-19 15:39                         ` Laszlo Ersek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox