summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--PerformancePkg/Dp_App/DpUtilities.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/PerformancePkg/Dp_App/DpUtilities.c b/PerformancePkg/Dp_App/DpUtilities.c
index 38d2293d85..38d7aa37f1 100644
--- a/PerformancePkg/Dp_App/DpUtilities.c
+++ b/PerformancePkg/Dp_App/DpUtilities.c
@@ -156,10 +156,10 @@ GetShortPdbFileName (
UINTN StartIndex;
UINTN EndIndex;
- ZeroMem (UnicodeBuffer, DXE_PERFORMANCE_STRING_LENGTH * sizeof (CHAR16));
+ ZeroMem (UnicodeBuffer, (DP_GAUGE_STRING_LENGTH + 1) * sizeof (CHAR16));
if (PdbFileName == NULL) {
- StrCpyS (UnicodeBuffer, DXE_PERFORMANCE_STRING_SIZE, L" ");
+ StrCpyS (UnicodeBuffer, DP_GAUGE_STRING_LENGTH + 1, L" ");
} else {
StartIndex = 0;
for (EndIndex = 0; PdbFileName[EndIndex] != 0; EndIndex++)
@@ -178,8 +178,8 @@ GetShortPdbFileName (
for (IndexA = StartIndex; IndexA < EndIndex; IndexA++) {
UnicodeBuffer[IndexU] = (CHAR16) PdbFileName[IndexA];
IndexU++;
- if (IndexU >= DXE_PERFORMANCE_STRING_LENGTH) {
- UnicodeBuffer[DXE_PERFORMANCE_STRING_LENGTH] = 0;
+ if (IndexU >= DP_GAUGE_STRING_LENGTH) {
+ UnicodeBuffer[DP_GAUGE_STRING_LENGTH] = 0;
break;
}
}