summaryrefslogtreecommitdiffstats
path: root/MdePkg
diff options
context:
space:
mode:
authorStar Zeng <star.zeng@intel.com>2018-04-11 14:18:38 +0800
committerStar Zeng <star.zeng@intel.com>2018-04-13 12:46:24 +0800
commitebe8ef866b7003ffa222ab8bb20b989f0132f206 (patch)
tree38ac3060dd855e41894d75cbb41fed50e9036e7f /MdePkg
parentbf453d581ecff2a73128873fd714a07508e2ab11 (diff)
downloadedk2-ebe8ef866b7003ffa222ab8bb20b989f0132f206.tar.gz
edk2-ebe8ef866b7003ffa222ab8bb20b989f0132f206.tar.bz2
edk2-ebe8ef866b7003ffa222ab8bb20b989f0132f206.zip
MdePkg DxeHstiLib: Fix ErrorString pointer incorrectly calculated
Fix ErrorString pointer is incorrectly calculated in InternalHstiIsValidTable(). Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Diffstat (limited to 'MdePkg')
-rw-r--r--MdePkg/Library/DxeHstiLib/HstiDxe.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/MdePkg/Library/DxeHstiLib/HstiDxe.c b/MdePkg/Library/DxeHstiLib/HstiDxe.c
index 58510766bb..d08d8def0c 100644
--- a/MdePkg/Library/DxeHstiLib/HstiDxe.c
+++ b/MdePkg/Library/DxeHstiLib/HstiDxe.c
@@ -1,6 +1,6 @@
/** @file
- Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -211,7 +211,7 @@ InternalHstiIsValidTable (
}
ErrorStringSize = HstiSize - sizeof(ADAPTER_INFO_PLATFORM_SECURITY) - Hsti->SecurityFeaturesSize * 3;
- ErrorString = (CHAR16 *)((UINTN)Hsti + sizeof(ADAPTER_INFO_PLATFORM_SECURITY) - Hsti->SecurityFeaturesSize * 3);
+ ErrorString = (CHAR16 *)((UINTN)Hsti + sizeof(ADAPTER_INFO_PLATFORM_SECURITY) + Hsti->SecurityFeaturesSize * 3);
//
// basic check for ErrorString