summaryrefslogtreecommitdiff
path: root/IntelFrameworkModulePkg/Library
diff options
context:
space:
mode:
authorHao Wu <hao.a.wu@intel.com>2015-07-07 06:13:53 +0000
committerhwu1225 <hwu1225@Edk2>2015-07-07 06:13:53 +0000
commitcce50970ced314e7eded9b64e9d01ce8605d52c6 (patch)
treebab77adb2434d8542dd8dbaba0b5fb6b1f2da519 /IntelFrameworkModulePkg/Library
parentdd4e2bcfaa068fd958169944e99149fa06b58354 (diff)
downloadedk2-platforms-cce50970ced314e7eded9b64e9d01ce8605d52c6.tar.xz
IntelFrameworkModulePkg GenericBdsLib: Resolve array size mismatch
Match the size of array GaugeString defined in function WriteBootToOsPerformanceData() with the size of field 'Token' defined in struct PERF_DATA in MdeModulePkg\Include\Guid\Performance.h. Doing so will ensure the size consistency when doing StrCpyS() between PERF_DATA.Token and GaugeString (like here in Performance.c). Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17851 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'IntelFrameworkModulePkg/Library')
-rw-r--r--IntelFrameworkModulePkg/Library/GenericBdsLib/Performance.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/IntelFrameworkModulePkg/Library/GenericBdsLib/Performance.c b/IntelFrameworkModulePkg/Library/GenericBdsLib/Performance.c
index 000542bdce..78039e79a5 100644
--- a/IntelFrameworkModulePkg/Library/GenericBdsLib/Performance.c
+++ b/IntelFrameworkModulePkg/Library/GenericBdsLib/Performance.c
@@ -40,7 +40,7 @@ GetShortPdbFileName (
UINTN EndIndex;
if (PdbFileName == NULL) {
- AsciiStrCpyS (GaugeString, PERF_TOKEN_LENGTH, " ");
+ AsciiStrCpyS (GaugeString, PERF_TOKEN_SIZE, " ");
} else {
StartIndex = 0;
for (EndIndex = 0; PdbFileName[EndIndex] != 0; EndIndex++)
@@ -60,7 +60,7 @@ GetShortPdbFileName (
for (Index = StartIndex; Index < EndIndex; Index++) {
GaugeString[Index1] = PdbFileName[Index];
Index1++;
- if (Index1 == PERF_TOKEN_LENGTH - 1) {
+ if (Index1 == PERF_TOKEN_LENGTH) {
break;
}
}
@@ -91,7 +91,7 @@ GetNameFromHandle (
CHAR8 *PdbFileName;
EFI_DRIVER_BINDING_PROTOCOL *DriverBinding;
- AsciiStrCpyS (GaugeString, PERF_TOKEN_LENGTH, " ");
+ AsciiStrCpyS (GaugeString, PERF_TOKEN_SIZE, " ");
//
// Get handle name from image protocol
@@ -153,7 +153,7 @@ WriteBootToOsPerformanceData (
UINT32 LimitCount;
EFI_HANDLE *Handles;
UINTN NoHandles;
- CHAR8 GaugeString[PERF_TOKEN_LENGTH];
+ CHAR8 GaugeString[PERF_TOKEN_SIZE];
UINT8 *Ptr;
UINT32 Index;
UINT64 Ticker;