]> git.proxmox.com Git - mirror_edk2.git/commitdiff
SecurityPkg/Tcg2PhysicalPresenceLib: Fix incorrect TCG VER comparision
authorTerry Lee <terry.lee@hpe.com>
Thu, 9 Jul 2020 02:46:47 +0000 (10:46 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Sun, 18 Oct 2020 01:14:43 +0000 (01:14 +0000)
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>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
SecurityPkg/Library/SmmTcg2PhysicalPresenceLib/SmmTcg2PhysicalPresenceLib.c

index 1c46d5e69d829c9648f48411b2186a29f09ffff9..8afaa0a7857d1816fd5240b8f78308f9a70699bb 100644 (file)
@@ -387,7 +387,7 @@ Tcg2PhysicalPresenceLibConstructor (
 {\r
   EFI_STATUS  Status;\r
 \r
-  if (AsciiStrnCmp(PP_INF_VERSION_1_2, (CHAR8 *)PcdGetPtr(PcdTcgPhysicalPresenceInterfaceVer), sizeof(PP_INF_VERSION_1_2) - 1) <= 0) {\r
+  if (AsciiStrnCmp(PP_INF_VERSION_1_2, (CHAR8 *)PcdGetPtr(PcdTcgPhysicalPresenceInterfaceVer), sizeof(PP_INF_VERSION_1_2) - 1) >= 0) {\r
     mIsTcg2PPVerLowerThan_1_3 = TRUE;\r
   }\r
 \r